OpenMediaVault RAID 5 Missing and Rebuilding
1. Phenomenon description
The system fails to start normally as:
-
Entering the password will enter rescue mode
-
Press
Ctrl + D
to enter normal mode -
After entering the password to enter the rescue mode, enter the
journaljl -xb
in the terminal to view the system log. You can see that it is due to a disk error/dev/sdc
. Requires manual repair. -
Press
Ctrl + D
to enter the normal mode, enter the host IP address to view in the browser, enter theStorage -> RAID Management
option, you can see that the status changes from the normalclean
toclean degrade
, the devices From the normal/dev/sdb /dev/sdc /dev/sdd
to/dev/sdb/dev/sdd
, it can be seen that RAID 5 is lost due to the/dev/sdc
error. -
Enter the
Storage -> File Systems
option,/dev/md0
, no auto mount
II. Solution
-
First, restart the system, enter the password to enter the rescue mode, and enter the following command in the terminal:
fsck -y /dev/sdc
Among them,
sdc
is replaced with your wrong disk, or you don’t know what went wrong, you can also use the following command:fsck -y /dev/sdb /dev/sdc /dev/sdd
Just enter all your RAID devices
-
After the disk is repaired, let’s rebuild RAID 5. At this time, the web-side RAID management that comes with OpenMediaVault is not feasible. You need to use a terminal command to operate.
-
Add the missing device:
mdadm /dev/md0 --add /dev/sdc
-
Stop RAID
mdadm --stop /dev/md0
-
Reassemble RAID 5
mdadm --assemble /dev/md0 /dev/sd[bcd] --verbose --force
Then you can see the system is rebuilding RAID 5