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

Azure: Add predictable symlinks for secondary disks #1165

Open
stereobutter opened this issue Apr 12, 2022 · 12 comments
Open

Azure: Add predictable symlinks for secondary disks #1165

stereobutter opened this issue Apr 12, 2022 · 12 comments

Comments

@stereobutter
Copy link

Similar to #1122 symlinks for secondary disks on azure are not stable. From what I can gather from trial an error there are /dev/disk/azure/resource and /dev/disk/azure/root where it appears /dev/disk/azure/root always references the boot disk correctly however /dev/disk/azure/resource is randomly assigned to any one of the secondary disks (including the temporary disk that every VM gets)

lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda      8:0    0   32G  0 disk
└─sda1   8:1    0   32G  0 part /var
sdb      8:16   0   32G  0 disk
├─sdb1   8:17   0    1M  0 part
├─sdb2   8:18   0  127M  0 part
├─sdb3   8:19   0  384M  0 part /boot
└─sdb4   8:20   0 31.5G  0 part /sysroot/ostree/deploy/fedora-coreos/var
                                /usr
                                /etc
                                /
                                /sysroot
sdc      8:32   0    7G  0 disk
└─sdc1   8:33   0    7G  0 part

where sda is a secondary disk I attached to the VM (to place /var on it via ignition), sdb the boot disk and sdc the temporary disk attached by azure.

looking at the symlinks gives

ls -la /dev/disk/*/*
lrwxrwxrwx. 1 root root  9 Apr 12 16:59  /dev/disk/azure/resource -> ../../sdc
lrwxrwxrwx. 1 root root 10 Apr 12 16:59  /dev/disk/azure/resource-part1 -> ../../sdc1
lrwxrwxrwx. 1 root root  9 Apr 12 16:59  /dev/disk/azure/root -> ../../sdb
...

What I'd actually like to to is place the user data on another disk via ignition so that I can backup that disk separately and in case disaster hits I can create a new VM with a snapshot of that disk (using wipe_table: false for that device).

@stereobutter

This comment was marked as off-topic.

@stereobutter

This comment was marked as off-topic.

@bgilbert

This comment was marked as off-topic.

@stereobutter

This comment was marked as off-topic.

@bgilbert

This comment was marked as off-topic.

@stereobutter

This comment was marked as off-topic.

@bgilbert

This comment was marked as off-topic.

@bgilbert

This comment was marked as off-topic.

@stereobutter
Copy link
Author

Thank you a lot for you patience 🙇
Using /dev/disk/by-partlabel/user_data for the filesystem worked as expected 🥳

If you can perhaps point me in the right direction, I'd be happy to try and contribute using the WALA udev rules for azure disks either in the docs or directly in the fcos images for azure. What do you think?

@bgilbert
Copy link
Contributor

Contributions are welcome if you're able to help! Ideally the rules would be included in a Fedora package that we could ship. Failing that, we could consider shipping them directly in fedora-coreos-config. I don't think the docs are a good way to proceed, especially since any udev rules specified via Ignition config don't take affect until after Ignition runs.

@dustymabe
Copy link
Member

dustymabe commented Apr 22, 2022

Regarding udev rules we already include the WALinuxAgent RPM in FCOS and have some glue to copy the udev rules into the initramfs.

One problem I see is that the RPM is a bit out of date with the latest release so maybe we just need to get the maintainer to bump things? --> Open BZ requesting new release be built: https://bugzilla.redhat.com/show_bug.cgi?id=2040980

@jlebon
Copy link
Member

jlebon commented Feb 15, 2024

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

No branches or pull requests

4 participants