2

Is it easy to convert a RAID6 to a RAID60?

Right now, I have an 8-drive RAID6. I'm looking to upgrade to a 3U 16-bay system and thinking of having a 16-drive RAID60. Is it possible to move my drives over to the new system start the RAID6 and then expand it into a RAID60 when I add the 8 new drives?

A RAID60 is just two RAID6 arrays striped, so what would happen if I build a new RAID6 and then add a RAID0 over over the new and existing array? Would I lose all my data on the existing RAID6?

Devon
  • 780
  • 1
  • 9
  • 20
  • Why RAID 60? What do you feel you're gaining by using it? Is capacity your primary concern? – ewwhite Oct 16 '14 at 21:52
  • @ewwhite: What would be the alternatives for a large RAID? My main concerns are both capacity and reliability. A RAID60 could withstand up to 4 drive failures with 16 drives which makes it fairly reliable and the striping would help with speed on 16 drives. – Devon Oct 16 '14 at 22:57

2 Answers2

5

You can't make it a RAID60 - mdadm's reshape doesn't know how to do that conversion.

Since you just want to stripe the two together (and presumably don't need the performance benefits, just the space, of the RAID0?), you could use LVM. What that would probably look like is..

  • Set up the 8 new drives with LVM - make a RAID6 block device with mdadm, then make that device a physical volume for a new volume group in LVM. Set up a logical volume, drop a filesystem on it.
  • Copy the data all over to the new logical volume
  • Verify the data thoroughly - something like hashdeep to check the actual data in the files. Good time to also verify your backups are working.
  • Blow away the filesystem on the old RAID6 group, make that block device a second LVM physical volume. Add to volume group. Assign spare space to logical volume. Expand filesystem to new expanded LV size.
Shane Madden
  • 112,982
  • 12
  • 174
  • 248
  • *Fraught with peril...* – ewwhite Oct 16 '14 at 22:00
  • @ewwhite Yup. Added some bold-italic. – Shane Madden Oct 16 '14 at 22:01
  • 1
    Better yet, since we're rebuilding the FS from [more or less] the ground-up, now would be a good time to ditch RAID altogether and move to a next-gen filesystem like ZFS. – Sammitch Oct 16 '14 at 22:05
  • @Sammitch Good point, that'd be a great option as well. – Shane Madden Oct 16 '14 at 22:05
  • @Sammitch And if you go ZFS, plan on using mirrors... not RAIDZ(1,2,3) – ewwhite Oct 16 '14 at 22:23
  • 1
    @ewwhite Mirrors would be overkill for this in terms of capacity and speed. It also doesn't protect against failures as well in some cases. For instance, in a large RAID10, 2 drive failures could result in failure on a RAID10 if they both occur in the same mirror which is highly plausible during a rebuild. – Devon Oct 16 '14 at 22:59
  • 1
    @ShaneMadden thanks for the idea but I was hoping to get some benefits of speed in the stripe. I don't want the system to be too slow in write speed particularly as this is mostly for storage / backups. – Devon Oct 16 '14 at 23:00
1

I think it is possible by making new RAID0 array which contains single RAID6 array (Nested RAID 60 array).

  • Creating new RAID 6 array

    mdadm -C /dev/md101 -l6 -n8 /dev/sdi /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp
    
  • Creating new RAID 60 array (half-sized)

    mdadm -C /dev/md102 -l0 --force --raid-devices=1 /dev/md101
    
  • Making filesystem

    mxfs.ext4 /dev/md102
    
  • Copy everything

    mount /dev/md102 /mnt
    cp -ar /raid/* /mnt
    
  • Stopping old RAID6

    umount /raid
    mdadm --stop /dev/md0
    
  • Creating another RAID 6 array

    mdadm -C /dev/md100 -l6 -n8 /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh
    
  • Adding RAID 6 array to RAID0(mdadm grows 1-drive RAID0 array to 3-drive degraded RAID4)

    mdadm --grow /dev/md102 --raid-devices=2 --add /dev/md100
    
  • Changing degraded RAID 4 to RAID 0

    mdadm --grow /dev/md102 -l0 -n2
    
  • Extending FS

    resize2fs /dev/md102