Skip to contentSkip to conversation

Growing RAID-10 (near-2) array - which kernel needed?

DISCUSSION [email protected] 3 participants 5 messages Dec 11, 2014 – Dec 12, 2014 MD RAID

lore
Share & tools
lore
#0 lore raw

Apologies for raising this topic again, but I can't seem to find anything googling, and man mdadm doesn't also give me a clue. Which kernel version is needed to grow a near-2 RAID 10 array?

I'm currently running kernel 3.13.0 with mdadm 3.2.5. But I could also use a live CD with a newer kernel, if needed.

I have replaced the 4 disks here with larger ones (2TB drives -> 4 TB drives), and this is what the array currently looks like:

# mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Sat Aug 20 08:15:07 2011
     Raid Level : raid10
     Array Size : 3906764800 (3725.78 GiB 4000.53 GB)
  Used Dev Size : 1953382400 (1862.89 GiB 2000.26 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

Update Time : Thu Dec 11 08:31:15 2014
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

Layout : near=2
Chunk Size : 512K

Name : alpha:0 (local to host alpha) UUID : 8199e640:58fc3a04:99b52fe6:80a1574d
Events : 918971

Number Major Minor RaidDevice State
6 8 1 0 active sync /dev/sda1
5 8 33 1 active sync /dev/sdc1
7 8 17 2 active sync /dev/sdb1
4 8 49 3 active sync /dev/sdd1

#1 lore raw
Quoted 4 lines · On Thu Dec 11, 2014 at 07:31:31PM +0100, [email protected] wrote:

Apologies for raising this topic again, but I can't seem to find anything googling, and man mdadm doesn't also give me a clue. Which kernel version is needed to grow a near-2 RAID 10 array?

Full reshape support (changing number of devices, layout or chunk size) was introduced in 3.5 (http://kernelnewbies.org/Linux_3.5).

Quoted 3 lines

I'm currently running kernel 3.13.0 with mdadm 3.2.5. But I could also use a live CD with a newer kernel, if needed.

It also requires mdadm 3.3 or above.

Quoted 28 lines

I have replaced the 4 disks here with larger ones (2TB drives -> 4 TB drives), and this is what the array currently looks like:

# mdadm --detail /dev/md0
/dev/md0:
         Version : 1.2
   Creation Time : Sat Aug 20 08:15:07 2011
      Raid Level : raid10
      Array Size : 3906764800 (3725.78 GiB 4000.53 GB)
   Used Dev Size : 1953382400 (1862.89 GiB 2000.26 GB)
    Raid Devices : 4
   Total Devices : 4
     Persistence : Superblock is persistent

Update Time : Thu Dec 11 08:31:15 2014
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

Layout : near=2
Chunk Size : 512K

Name : alpha:0 (local to host alpha) UUID : 8199e640:58fc3a04:99b52fe6:80a1574d
Events : 918971

Quoted 6 lines

Number Major Minor RaidDevice State
6 8 1 0 active sync /dev/sda1
5 8 33 1 active sync /dev/sdc1
7 8 17 2 active sync /dev/sdb1
4 8 49 3 active sync /dev/sdd1

I can't find anything explicitly covering growing a RAID 10 by just increasing the device sizes. I would have thought that would be an easier task than doing so by adding disks, so should be supported in an earlier version. mdadm 3.2.1 mentions supporting converting between RAID-10 and RAID-1, which can definitely be grown.

Have you tried doing a grow with the versions you have?

Cheers,
Robin

Signature · 4 lines
     ___        
    ( ' }     |       Robin Hill        <[email protected]> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |
#2 lore raw
Quoted 42 lines · On Thu, 11 Dec 2014 19:21:39 +0000 Robin Hill <[email protected]> wrote:
Quoted 4 lines · On Thu Dec 11, 2014 at 07:31:31PM +0100, [email protected] wrote:

Apologies for raising this topic again, but I can't seem to find anything googling, and man mdadm doesn't also give me a clue. Which kernel version is needed to grow a near-2 RAID 10 array?

Full reshape support (changing number of devices, layout or chunk size) was introduced in 3.5 (http://kernelnewbies.org/Linux_3.5).

Quoted 3 lines

I'm currently running kernel 3.13.0 with mdadm 3.2.5. But I could also use a live CD with a newer kernel, if needed.

It also requires mdadm 3.3 or above.

Quoted 28 lines

I have replaced the 4 disks here with larger ones (2TB drives -> 4 TB drives), and this is what the array currently looks like:

# mdadm --detail /dev/md0
/dev/md0:
         Version : 1.2
   Creation Time : Sat Aug 20 08:15:07 2011
      Raid Level : raid10
      Array Size : 3906764800 (3725.78 GiB 4000.53 GB)
   Used Dev Size : 1953382400 (1862.89 GiB 2000.26 GB)
    Raid Devices : 4
   Total Devices : 4
     Persistence : Superblock is persistent

Update Time : Thu Dec 11 08:31:15 2014
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

Layout : near=2
Chunk Size : 512K

Name : alpha:0 (local to host alpha) UUID : 8199e640:58fc3a04:99b52fe6:80a1574d
Events : 918971

Quoted 8 lines
Quoted 6 lines

Number Major Minor RaidDevice State
6 8 1 0 active sync /dev/sda1
5 8 33 1 active sync /dev/sdc1
7 8 17 2 active sync /dev/sdb1
4 8 49 3 active sync /dev/sdd1

I can't find anything explicitly covering growing a RAID 10 by just increasing the device sizes.

commit 006a09a0ae0a494473a8cd82c8d1d653e37e6663

Author: NeilBrown <[email protected]>
Date:   Mon Mar 19 12:46:40 2012 +1100

md/raid10 - support resizing some RAID10 arrays.

$ git describe --contains 006a09a0ae0a494473a8cd82c8d1d653e37e6663
v3.4-rc1~147^2~8

So Linux-3.4 is needed.
I don't think you need a particularly new mdadm.

NeilBrown

Quoted 10 lines

I would have thought that would be an
easier task than doing so by adding disks, so should be supported in an earlier version. mdadm 3.2.1 mentions supporting converting between RAID-10 and RAID-1, which can definitely be grown.

Have you tried doing a grow with the versions you have?

Cheers,
Robin

#4 lore raw
In reply to Robin Hill
Quoted 1 line

Have you tried doing a grow with the versions you have?

Not yet, I thought it'd be wise to ask first, as this appears to be nowhere documented. And I like restricting the cases where I need to revert to my backup to the absolute minimum. :-)

Thanks, Chris