How to Grow RAID Array in OpenMediaVault After Upgrading All Existing Drives with Larger Drives

Scenario: You have an existing RAID array in OMV and you have replaced each drive one at a time with a larger drive. Now you wish to grow the array into the larger size but it turns out the GUI of OMV does not have that option. When you navigate to “Multiple Device” (RAID Management in older versions) and then click “Grow,” it comes up with an empty list of devices. This is expected since all of your drives are used in the array already. If you navigate to “Filesystem” and try to Grow, nothing appears to happen after you click Yes.

Fortunately there is a solution using the command line. To grow the array into the new larger size after all drives have been upgraded, access the console of OMV (e.g., via SSH) and issue the command:

 mdadm --grow /dev/mdX --size=max

where the letter X represents the number of your md device. The first md device is typically zero (i.e., md0).  If you are unsure, issue the command below to see a list of devices.

cat /proc/mdstat

After issuing the grow command, you should receive a confirmation immediately that the array has been resized. Something like this for an md0 device:

mdadm: component size of /dev/md0 has been set to [the new size in K]

You can confirm the change has taken place by navigating back to Multiple Device (or RAID Management) where you will then see the RAID is in a resync process.

Once the resync is complete, you may need to reboot the system.  Then go back to Multiple Device and click Grow and confirm to proceed.   The process will take some time, but you should slowly see the free space and total size increase on client devices that have mounted shares.

This entry was posted in Uncategorized. Bookmark the permalink.