Expand Raid5 with 1 bigger disk

  • I have a Raid 5 with 3 disks set up and running just fine. The drives are of different sizes.


    I know that I can add another disk and grow the array.


    But I'd like to replace 1 disk with a bigger disk and make the array bigger.


    Is that possible?

    • Offizieller Beitrag

    No. When using three different size disks, you only use the amount of space on each disk equal to the smallest disk. Not sure if you replace the smallest disk with a larger disk that it would adjust the other two drives. If you add the new drive as a fourth drive, you will gain space.

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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 say I have 3 disks


    10GB, 20GB and 30GB


    That will give me a Raid array of 20GB, right?


    Now I replace the 10GB disk with a 20GB disk. If I create a new array I will get 40GB, right.


    But can I just grow/expand the array without creating a new array?

    • Offizieller Beitrag

    Yep, that would give you 20 GB.


    If you created a new array, you would get 40 GB.


    I'm not sure if you grow/expand, if you would get 40 GB. I've always used the same size drives in an array. You could always test it in a virtual machine. I will try later if you aren't sure how to do that.

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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!

    • Offizieller Beitrag

    I installed a fresh copy of OMV in Virtualbox and updated. I created a raid 5 array with 10, 20, and 40 GB disks giving me a 20 GB array. I formatted ext4 and mounted it.


    Then, I removed the 10 gb and added a new 40 GB drive. I added this to the existing array by using the Recover button in the Raid section. Once done, it was still 20 GB. mdadm should resync the drive and detect a capacity change - 40 gb now. Then you can use the Resize button in the Filesystems section to resize the filesystem to 40 GB.


    All of this was done from the web interface.

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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!

    • Offizieller Beitrag

    I couldn't find a command to make mdadm detect the change. It did it on its own.

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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!

  • You need to tell mdadm that your raid is now bigger. So growit and you will be fine:



    Code
    mdadm --grow /dev/md127 --size=max


    It will not and never happen automatically as this is not the intention of the raid thing.


    After that you need to tell LVM that the PD is now bigger


    Code
    pvresize /dev/md127


    And finally the filesystem need to grow ...

    Everything is possible, sometimes it requires Google to find out how.

    • Offizieller Beitrag
    Zitat von "SerErris"
    Code
    mdadm --grow /dev/md127 --size=max


    It will not and never happen automatically as this is not the intention of the raid thing.


    You are right. I issued that command but thought it had already resized. I guess it would be nice if the Grow button did this or there was another button to do this in the Raid section.

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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!

    • Offizieller Beitrag

    Yes.

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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, I did the same test myself and it worked perfectly.


    But when I did "pvresize /dev/md127" it automatically extended my "Volume Group" and my "Logical Volume"


    Now I only had one of each. But if I have more Groups and Volumes? I would like to choose witch one to grow/extend

  • Hi,


    1 physical volume belongs to exactly one Volume Group. So extending that physical volume will allways extend the volume group. Having multiple volume groups on a single physical volume is somehow contradicting the aproach of LVM anyhow.


    It should not extend the Logical Volume ... are you sure it extended the volume and not only the volume group?

    Everything is possible, sometimes it requires Google to find out how.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!