And actually, 'dmraid -p' should fail when there are partitions (or other device-mapper tables) on that device. The correct action is to remove the partitions (or other device-mapper devices) _first_ and then remove the dmraid device. Much like you'd do with LVM; imagine you'd have a LVM setup on the dmraid device. You surely do _not_ want dmraid to succeed here. (For the same reason the udev rule wouldn't work, neither; we're only getting a 'remove' event if the device has been removed, which it can't, as it's being held busy by the devices stacked on top.) So from my POV the system works as designed.