Adding a drive to Raid5

  • Hello Guys!

    I need to add more capacity (adding a new drive) to a volume formatted with XFS file system, I use Raid5 and LVM, what are the best procedures?
    Does the command "resizefs" works on XFS? I've seen people using a tool called "xfs_growfs" is this available on OMV?


  • resize2fs is exclusively for ext2/3/4 file systems. For xfs you would indeed use the xfs_growfs command. The command should be available on OMV.

    Procedure is almost identical to your previous topic (Extend Raid5) minus the last part :

    mdadm --grow /dev/mdX --raid-devices=4 --add /dev/sdY
    pvresize /dev/mdX
    lvextend -l +100%FREE <logical vol path>
    xfs_growfs <logical vol path>

    As stated in the above mentionned topic, you should be able to grow the raid by adding the disk in the webgui, but you won't be able to resize the Physical Volume since the LVM plugin only allows creation/deletion of a PV. For that part you will have to do it from command line. The rest (extend LV then grow FS) should be possible from webgui.

    :!: Warning: after issuing the mdadm grow command, you should wait for the raid array to complete rebuilding before extending the lvm and filesystem. It could take several hours or a couple of days depending on your array size.

  • You can do it from the omv webUI.

    First grow the raid5 array by adding the new device, once it finishes reshaping, you will need to grow the physical volume.

    From the cli you can grow the pv with pvresize /dev/md0, after refreshing the ui, it should display the new size for pv, also for the vg. From there you can extend from the webUI the logical partition.

    Finally you can go to file system section and press the resize option.

    If you don't feel to sure about this, you can try first in a virtual machine. So you can play around with the procedure.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!