#mdadm #btrfs #ext4 #omv #openmediavault #raid5
The raid’s name
# cd /dev/
The name is md127, sometimes it’s md0, or a other one.
To reappear the raid when it simply disappear
# mdadm -S /dev/md0 # mdadm --assemble /dev/md0 /dev/sd[bcdef] --verbose --force
To force a check of the entire array while it’s online. Run as root
# echo check > /sys/block/md0/md/sync_action
To check raid status
# mdadm -D /dev/md0
And if you have a error like: Impossible to mount file system : Structure needs cleaning
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; mount -v --source '/dev/disk/by-id/md-name-openmediavault:raid9disks' 2>&1' with exit code '32': mount: mount /dev/md0 on /srv/dev-disk-by-id-md-name-openmediavault-raid9disks failed: Structure needs cleaning
You must do this
# fsck /dev/md0
And, if needed, fix all errors. After that you can mount the file system.
If not try this
# fsck.ext4 -f /dev/disk/by-id/md-name-openmediavault:raid9disks # mount -a
Synology (false raid) !
If you use, in OMV, disks from a Synology NAS, you ‘ll get problem when you create the raid. Example here to create a raid 5 with 3 disks (12To each of them)
So the solution is format, each disk, with the dd command
# dd if=/dev/zero of=/dev/sdb # dd if=/dev/zero of=/dev/sdc # dd if=/dev/zero of=/dev/sdd
After that you can create raid 5 without any problem.
Replace disk (remove / install)
You can do all this is the GUI. Raid Management -> select your raid -> select delete on the toolbar -> popup should appear displaying the 2 drives -> select the drive to remove -> click ok, the drive has now been removed from the array, you can remove the drive from the machine
Install the new drive. Storage Disks -> select the newly inserted drive, select wipe on the toolbar, short wipe should be enough
Storage File Systems
Format the new drive with the same filesystem as the one you are keeping -> EXT4
Once Format has finished > Raid Management -> Recover on the toolbar -> popup box should appear -> select the new drive -> click ok
The raid should now be resyncing/rebuilding with the new drive
resize file system (btrfs - omv default)
So hard to find the correct information.
Add new disk to a raid and you can’t a change in the filesystem. So uyou must grow up your file system with the right command.
You can see the size of the raid5 which is 26T, but we have 4 disks of 14To, so the raid must be 39To…
You can see the filesystem, here is this btrfs (default in Open Media Vault)
And copy the uuid of the raid.
#btrfs filesystem resize max /srv/dev-disk-by-uuid-daef2abf-dfa3-421b-ab23-e2e580b2e45b
Resize '/srv/dev-disk-by-uuid-daef2abf-dfa3-421b-ab23-e2e580b2e45b' of 'max'
Install to Raspbian (Helios 4 / Helios 64)
# apt-get remove chrony
# wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash