On Thu, Aug 31 2017, Xiao Ni wrote: >> >> udev will create the device and multiple links. You are just removing >> the device. Someone might come along and complain about the links. > > Sorry, could you explain "udev will create the device and multiple links" in detail? > Does it mean unlink can cause udev to re-create the device and multiple links? Or > You mean it should remove other links by unlink too, not only the device? If you have an md array assembled, run udevadm info /dev/mdWHATEVER | grep DEVLINKS e.g. $ udevadm info /dev/md0 | grep DEVLINKS E: DEVLINKS=/dev/disk/by-id/md-uuid-4812bff9:24c9ef72:14a75d6a:bbcc0774 /dev/md/0 /dev/disk/by-id/md-name-any:0 Note that there are multiple names listed. When the array appears, udev creates the device (/dev/md0 in this case) and creates all the links pointing to the device. When the array disappears, udev removes the device and the links. You want to get mdadm to remove the device, but not the links. That is, at best, half the job. NeilBrown
Attachment:
signature.asc
Description: PGP signature