Add disk and Resize a raid 6

    • OMV 3.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Add disk and Resize a raid 6

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

      Source Code

      1. Version : 1.2
      2. Creation Time : Sat Jul 1 04:52:10 2017
      3. Raid Level : raid6
      4. Array Size : 1953262592 (1862.78 GiB 2000.14 GB)
      5. Used Dev Size : 976631296 (931.39 GiB 1000.07 GB)
      6. Raid Devices : 4
      7. Total Devices : 7
      8. Persistence : Superblock is persistent
      9. Intent Bitmap : Internal
      10. Update Time : Sun Jul 23 18:06:29 2017
      11. State : clean
      12. Active Devices : 4
      13. Working Devices : 7
      14. Failed Devices : 0
      15. Spare Devices : 3
      16. Layout : left-symmetric
      17. Chunk Size : 512K
      18. Name : openmediavault:0 (local to host openmediavault)
      19. UUID : dbfbaa60:32861514:9895d72f:7985cfdf
      20. Events : 1899
      21. Number Major Minor RaidDevice State
      22. 0 8 16 0 active sync /dev/sdb
      23. 1 8 32 1 active sync /dev/sdc
      24. 2 8 48 2 active sync /dev/sdd
      25. 3 8 64 3 active sync /dev/sde
      26. 4 8 80 - spare /dev/sdf
      27. 5 8 0 - spare /dev/sda
      28. 6 8 96 - spare /dev/sdg
      Display All

      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.

      The post was edited 1 time, last by doommick: add the omv version OMV 3.0.79 Erasmus ().

    • 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.
      Good backup takes the "drama" out of computing
      ____________________________________
      OMV 3.0.90 Erasmus
      ThinkServer TS140, 12GB ECC / 32GB USB3.0
      4TB SG+4TB TS ZFS mirror/ 3TB TS

      OMV 3.0.81 Erasmus - Rsync'ed Backup Server
      R-PI 2 $29 / 16GB SD Card $8 / Real Time Clock $1.86
      4TB WD My Passport $119

      The post was edited 1 time, last by flmaxey: edits ().

    • 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)

      Source Code

      1. Version : 1.2
      2. Creation Time : Sat Jul 1 04:52:10 2017
      3. Raid Level : raid6
      4. Array Size : 1953262592 (1862.78 GiB 2000.14 GB)
      5. Used Dev Size : 976631296 (931.39 GiB 1000.07 GB)
      6. Raid Devices : 5
      7. Total Devices : 7
      8. Persistence : Superblock is persistent
      9. Intent Bitmap : Internal
      10. Update Time : Sat Aug 12 11:43:10 2017
      11. State : clean, reshaping
      12. Active Devices : 5
      13. Working Devices : 7
      14. Failed Devices : 0
      15. Spare Devices : 2
      16. Layout : left-symmetric
      17. Chunk Size : 512K
      18. Reshape Status : 0% complete
      19. Delta Devices : 1, (4->5)
      20. Name : openmediavault:0 (local to host openmediavault)
      21. UUID : dbfbaa60:32861514:9895d72f:7985cfdf
      22. Events : 2014
      23. Number Major Minor RaidDevice State
      24. 0 8 16 0 active sync /dev/sdb
      25. 1 8 32 1 active sync /dev/sdc
      26. 2 8 48 2 active sync /dev/sdd
      27. 3 8 64 3 active sync /dev/sde
      28. 5 8 0 4 active sync /dev/sda
      29. 4 8 80 - spare /dev/sdf
      30. 6 8 96 - spare /dev/sdg
      Display All
    • doommick wrote:

      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.
      Good backup takes the "drama" out of computing
      ____________________________________
      OMV 3.0.90 Erasmus
      ThinkServer TS140, 12GB ECC / 32GB USB3.0
      4TB SG+4TB TS ZFS mirror/ 3TB TS

      OMV 3.0.81 Erasmus - Rsync'ed Backup Server
      R-PI 2 $29 / 16GB SD Card $8 / Real Time Clock $1.86
      4TB WD My Passport $119
    • 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
    • doommick wrote:

      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 ?
      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.
      Good backup takes the "drama" out of computing
      ____________________________________
      OMV 3.0.90 Erasmus
      ThinkServer TS140, 12GB ECC / 32GB USB3.0
      4TB SG+4TB TS ZFS mirror/ 3TB TS

      OMV 3.0.81 Erasmus - Rsync'ed Backup Server
      R-PI 2 $29 / 16GB SD Card $8 / Real Time Clock $1.86
      4TB WD My Passport $119