I have mounted raid1 luks non-root partition which is automated through created mount unit. Recently I’ve discovered that the FS is corrupted and decided to fsck it remotely without rebooting the server.
So, I’ve stopped the unit. And tried fsck it, and got the response that the device is still seen mounted. The same happens when I try to umount manually: it refers that the resource is busy, and only lazy umount works but the result is the same, as with stopping the unit.
So, I’ve decided to change the Options=defaults,noauto
in the mount unit. Stopping/starting leads to the the errors. In the log I see: kernel: [258607.858951] dm-1: Can't mount, would change RO state
.
So, how to do it properly to umount the partition and fsck it without rebooting to live mode wich cannot be controlled remotely?