Growing RAID5 after changing all data drives?

  • Hi all


    So I've been busy the last few days swapping out each of my x4 3TB drives for x4 6TB drives. All done by manually failing one drive at a time in the RAID and then adding its replacement.


    I know I now need to grow the RAID before growing the file system, and it appears that needs to be done in CLI and not in the GUI. My query is what commands do I need to run in CLI to do this (and do I need to run anything beforehand to make sure I do this right?)


    I've got the same number of drives before and after, so is it simply mdadm --grow /dev/md0 --raid-devices=4 or a variation of that?


    Thanks


    Adrian

    • Official Post

    I've got the same number of drives before and after, so is it simply

    Close but you miss the prize :) try --size=max instead of --raid-devices=4 mdadm already knows the array contains 4 drives, just doesn't know how big they are

    Raid is not a backup! Would you go skydiving without a parachute?


    OMV 6x amd64 running on an HP N54L Microserver

  • Superb! Thank you - ran mdadm --grow /dev/md0 --size=max and output says

    mdadm: component size of /dev/md0 has been set to 5860391424K


    In GUI it now says it's 'active, resyncing' and looks like it'll take 10 hours or so to finish (and there was me thinking I'd done with all the hanging around lol). Looking forward to the 16.4TB capacity!


    Presume the file system expansion should work fine from within the GUI just by using the resize option?

  • OK, well progress has been made :) RAID now shows 16.4TB and clean, so that's all good.


    Went to the file system and selected resize - get the following error message:


    What am I doing wrong?!

    • Official Post

    It looks like I might need to convert to 64-bit to get around the file size limit for Ext4, but not sure how

    Yes, I found that through a search, there is a way of doing that but I believe it's going to be a cli option........ ryecoaaron

    • Official Post

    sudo resize2fs -b /dev/md0 should convert to 64bit.

    omv 7.3.0-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.1.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Official Post

    while the filesystem is mounted.

    sudo umount /dev/md0


    if it says it is busy, it might make sense to boot systemrescue and do the conversion.

    omv 7.3.0-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.1.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • OK, slightly panicked now lol


    Code
    root@openmediavault:~# sudo umount /dev/md0
    umount: /dev/md0: not mounted.
    root@openmediavault:~# sudo resize2fs -b /dev/md0
    resize2fs 1.46.2 (28-Feb-2021)
    resize2fs: Device or resource busy while trying to open /dev/md0
    Couldn't find valid filesystem superblock.
  • I'm a bit stuck with this now - I've downloaded and booted into systemrescue, got the terminal up and running, but when I try and run the command to convert to 64 bit I just get a message saying open: no such file or directory while opening /dev/md0


    Doesn't make any odds whether I try and unmount or mount the file system - if I try and unmount dev/md0 it says no mount point specified, and if I try to mount it it says can't find in /etc/fstab


    All suggestions gratefully received!

  • Just to add that if I open GParted, the file system looks to have a different partition name of /dev/md127 so maybe it's just that that I need to change from md0?


    There's a red and orange triangle with an exclamation mark next to it, but nothing to suggest what it means

  • Thanks geaves - that's all it was - I ran the conversion command and it asked me to run a check routine first, which I did, and it did some kind of node optimisation, then ran the 64 bit command which took about 10 minutes. Logged out of systemrescue and into OMV and it's allowed me to grow the file system now, so have a lovely 42% full file system, rather than 80+% full before, with 9.5TB of free space!

  • Adrian E

    Added the Label resolved

Participate now!

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