Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use external_volumes resource parameter to map storage items to right home and cache #127

Open
sverhoeven opened this issue Feb 14, 2022 · 2 comments

Comments

@sverhoeven
Copy link
Member

sverhoeven commented Feb 14, 2022

Define a plugin parameter like

portal live surfresearchcloud nl_ (1)

In Ansible a external_volumes variable will be available which is a string. This contains the storage items in the order the user selected it. The external_volumes var will be populated by the SRC system.

To get /home and /dcache-cache mounted from the right storage items we need to map the volume_id to a disk id.
For example first volume_id is ddc30b53-105e-4113-9379-c7d3ec9d90e5 then /dev/sdb1 is the first storage item selected.

ls -l /dev/disk/by-id/
lrwxrwxrwx 1 root root  9 Jan  6 15:09 scsi-SQEMU_QEMU_HARDDISK_ddc30b53-105e-4113-9379-c7d3ec9d90e5 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jan  6 15:09 scsi-SQEMU_QEMU_HARDDISK_ddc30b53-105e-4113-9379-c7d3ec9d90e5-part1 -> ../../sdb1
@sverhoeven
Copy link
Member Author

Ansible tasks could be something like

shell: echo {{ external_volumes }} | jq [0].volume_id | <grep in /dev/disk/by-id/ for right sdXX>
  register: home_device
mount:
  src: home_device
  target: home_dir

@sverhoeven sverhoeven changed the title Use external_volumes resource pararmeter to map storage items to right home and cache Use external_volumes resource parameter to map storage items to right home and cache Feb 14, 2022
@sverhoeven
Copy link
Member Author

We should keep the vagrant build working with 2 extra disks. We probably need a vagrant and src ansible blocks to treat them accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant