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

Pausing udev makes /dev/disk/by-* unusable for installations #105

Open
jrha opened this issue Feb 9, 2024 · 3 comments · May be fixed by #106
Open

Pausing udev makes /dev/disk/by-* unusable for installations #105

jrha opened this issue Feb 9, 2024 · 3 comments · May be fixed by #106
Milestone

Comments

@jrha
Copy link
Member

jrha commented Feb 9, 2024

The change introduced back in 55401db pauses udev until partition metadata is wiped, but crucially this does not happen until the partition exists (i.e. test -e PARTITION passes).

On hosts with complex storage topologies the udev managed symlinks under /dev/disk/by-path are commonly used to identify the installation device.

For example, installing to the disk /dev/disk/by-path/pci-0000:c3:00.0-ata-1 will hang forever waiting for the first partition /dev/disk/by-path/pci-0000:c3:00.0-ata-1-part1 to exist as the generated code in the kickstart file does the following:

udevadm control --stop-exec-queue
parted /dev/disk/by-path/pci-0000:c3:00.0-ata-1 -s -- u s mkpart primary $begin $end
while true; do
    sleep 1
    udevadm settle --timeout=5
    test -e /dev/disk/by-path/pci-0000:c3:00.0-ata-1-part1 && break
done
wipe_metadata /dev/disk/by-path/pci-0000:c3:00.0-ata-1-part1
udevadm control --start-exec-queue
udevadm settle

Side note: I'm not sure if calling udevadm settle while the queue is stopped is even meaningful.

It's not clear to me how to handle this without breaking the original use-case here, as starting the queue earlier will cause the same LVM related issues as originally described.

@jrha
Copy link
Member Author

jrha commented Feb 9, 2024

Could we trigger just /usr/lib/udev/rules.d/60-persistent-storage.rules?

@jrha
Copy link
Member Author

jrha commented Feb 9, 2024

Alternatively, instead of pausing udev, could we mask the device-mapper related rules?

touch /etc/udev/rules.d/{10-dm.rules,11-dm-parts.rules,13-dm-disk.rules}
…
rm -f /etc/udev/rules.d/{10-dm.rules,11-dm-parts.rules,13-dm-disk.rules}

jrha added a commit to jrha/ncm-lib-blockdevices that referenced this issue Feb 9, 2024
While partitions are being created and wiped, mask udev rules related to
Device Mapper and LVM to prevent partitions from being activated
automatically. This replaces the previous solution of completely
stopping udev during these operations, which prevented the use of
device names created by the persistent storage rules.

Fixes quattor#105.
@jrha jrha linked a pull request Feb 9, 2024 that will close this issue
@jrha
Copy link
Member Author

jrha commented Feb 9, 2024

Tested potential solution in #106.

@jrha jrha added this to the 24.10 milestone Sep 13, 2024
@jrha jrha modified the milestones: 24.10, 25.next Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant