Comment 7 for bug 1659509

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1659509] Re: curtin fails to create MD devices

I think I understand the problem here.

In the above log, when the system booted, /dev/sdb had two partitions
defined; but previously it had 3 partitions, one of which was a mdadm
device.
When curtin starts, it examines the current disk configuration and attempts
to wipe out metadata at the known partitions and offsets.
We then proceed to partition the disks as requested. When the 3rd
partition on sdb is created and the program writing to the device (parted
or sgdisk)
exists, systemd-udev has a watch on device nodes created in /dev and
triggers udev rules.

The 64-md-raid-assembly.rules rule triggers an assembly of a raid array ;
if the partition is a member, then it
gets claimed by the kernel driver (sys/class/block/sdb3/holders/ has a link
to mdX) which prevents exclusive
opens of the device when then prevents further creation/use of /dev/sdb3.