Xiao Ni writes: > When one raid loses disks that are bigger than the max degraded number, > the udev rule[1] tries to stop > the raid device. If the raid device is mount, it tries to unmount it Why? If there are open files on it, you won't be able to unmount it anyway, and what would you gain by stopping the broken device? > first[2]. It uses udisks command to do this. > It's a little old. Now the package version is udisks2 which uses > udisksctl to do this. I write a patch[3] and do > test. It's failed because of "udisksctl error Permission denied". Udisks is a GNOME desktop component, and so may not even exist on many systems. When it does, you still can't call it from udev scripts since they are not run within the desktop in the context of a logged in user. If you want to unmount the device, just use umount.