0

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?

3
  • Check the status of the RAID1 set. The symptoms would match the situation where one disk of the RAID1 pair is already completely dead and the other disk has started failing too. If that's your situation, make a backup of all important data on that RAID set before doing anything else. It is quite possible that a filesystem check cannot fix this problem, and an actual hardware repair/replacement is needed. Commented Dec 21, 2024 at 15:00
  • Sadly, one disk is failed, the other one is OK. I do not have a possibility to travel to the server and would like to fix the filesystem remotely without rebooting the server. So, the main question is how to unmount the ext4 file system completely to run fsck, if this file system resides in a luks container which resides in a logic volume. Commented Dec 21, 2024 at 15:39
  • I repeat: take a backup ASAP. Your first disk has already died, and the second is about to die. The inability to complete an unmount indicates the OS has cached data it would need to write, but the remaining disk is no longer accepting any writes - at the firmware level. And that means the fsck command would also fail to make any changes to the disk. Commented Dec 21, 2024 at 15:51

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.