Add disk and Resize a raid 6

  • Hi I add 2 disk on my raid 6 build and i have this:



    I just grow my raid on the menu Raid management with my 2 new disk.
    The number of spare device is 3. How i can reduce this number and change it to active devices? May be only 1 or 0 spare devices is enough?
    I use OMV 3.0.79 Erasmus



    Thanks you for your help.

    Einmal editiert, zuletzt von doommick () aus folgendem Grund: add the omv version OMV 3.0.79 Erasmus

    • Offizieller Beitrag

    The idea behind RAID 6 is to be able to compensate for 2 disk failures. It that's what you want, 2 disks should remain as spares. Otherwise, if you add more than 1 of your 3 spares to the array, you will only have 1 spare drive.
    _________________________________________


    Before doing anything to your array, I'd strongly advise you to backup the data in your array! Much as it is with RAID recovery, adding a drive to a RAID array is a hard drive torture test. Drives can fail during these operations.
    ________________________________________



    One disk, of the 3 spares you have, can be added to the array using an mdadm command, as root, from the command line.


    The following command line is a sample. You'll have to adjust for the number of "active" drives in the array +1, and the device name of your RAID array. (which is, typically, /dev/md0)


    Based on what you provided above and assuming your RAID array device name is "dev/md0", the command would be:


    mdadm --grow /dev/md0 --raid-devices=5


    From there, in the OMV GUI, in RAID MANAGEMENT, under State, you should see "clean, reshaping". Depending on the size of the drives, reshaping could take a long time to complete. Wait until it's finished before attempting to add another.
    ((**Depending on the Processor, RAM, etc., your server may be "sluggish" until the reshaping process completes.**)


    To add a second drive from your pool of 3 spares the command would be:


    mdadm --grow /dev/md0 --raid-devices=6


    _______________________________________


    Finally, note that RAID is NOT backup! Do not depend on RAID to protect your data. If you do, you're risking losing it all.
    (If you search the forum, you'll find many instances where users lost their entire array, and the data on it.)


    It would be better to copy your data onto another big hard drive (internal or USB connected), to have a second copy. Preferably, your data should be copied / sync'ed to another machine.

  • Thank you for your response.


    I try this command : mdadm --grow /dev/md0 --raid-devices=5
    and I have in RAID MANAGEMENT "clean, reshaping". I wait but I think reshaping is stuck at 0%.




    Reshape Status : 0% complete
    Delta Devices : 1, (4->5)


    • Offizieller Beitrag

    Thank you for your response.


    I try this command : mdadm --grow /dev/md0 --raid-devices=5
    and I have in RAID MANAGEMENT "clean, reshaping". I wait but I think reshaping is stuck at 0%.


    Reshape Status : 0% complete
    Delta Devices : 1, (4->5)


    If you have a large array, it might take a l-o-n-g time. Depending on the size of the array, CPU speed and other factors, it might be a matter of days.

  • I do a backup of all my data before to do the cmd. Allways do a backup it's the best advice ever.


    I wait 1,5 days and I see the same status:


    Reshape Status : 0% complete
    Delta Devices : 1, (4->5)


    I decide to restart my NAS and now I have this trace:




    It is possible to recover my custom NAS ?Thanks

    • Offizieller Beitrag

    The command line is straight forward. I've used it, blindguy has used it and others on the forum have grown their arrays using it as well. But, doing anything to a RAID array is risky. As previously stressed, reshaping is HARD on the existing drives. Also, it must be assumed that the process can fail, and it's best to plan for it to fail. This is why backup is of the utmost importance.


    Looking at your screen capture / photo:
    - Does the OMV boot process finish, or does it hang?
    - What really stands out is the Lexar USB Flash Drive timeout. Is that your boot drive? If it is, do you have a cloned copy of it?.
    - It appears that drive dev/sdc has an issue - an I/O error with a sector named.
    ((Ordinarily, the array would kick a bad or failing drive out and go to clean-degraded. During a reshape, I don't know what effect a failing drive might have other than a failed array.))


    If OMV boots up - the first place to start with RAID recovery would be here -> RAID Recovery

    If OMV will not boot, it would be time to consider rebuilding the boot drive.
    ____________________________________________________________


    If you have to rebuild the array, this time you'll have an idea how many drives to assemble in the array at the start.


    However, if I were you, I wouldn't use RAID. If you can't recover the array, this is an opportunity to take another approach. There are relatively simple ways to allocate your network shares among your individual drives, without consolidating them into a single container approach (a RAID array). What you have as spare disks for an array can be used for a 2nd, or even a 3rd copy, of your data.

Jetzt mitmachen!

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