Skip to contentSkip to conversation

Is it possible to grow a (far) RAID 10?

DISCUSSION Carsten Aulbert 3 participants 4 messages Nov 25, 2014 – Nov 26, 2014 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi

after browsing various search results I'm not sure if a RAID0 (or a RAID10) can be grown at all, especially as
https://raid.wiki.kernel.org/index.php/Growing
only mentions levels 1/4/5/6 while the mdadm man-page suggests raid0 but not raid 10 - so consider me confused.

However, if at all possible, here is what I have/plan:

We have four 100GB SSDs partitioned only to use 50% of that, e.g.

parted -s /dev/sdc print
Model: ATA INTEL SSDSC2BA10 (scsi)
Disk /dev/sdc: 100GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name     Flags
 1      2097kB  50.0GB  50.0GB                  primary  raid

These are assembled like this:

# mdadm -D /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Thu Oct  9 14:11:36 2014
     Raid Level : raid10
     Array Size : 97615616 (93.09 GiB 99.96 GB)
  Used Dev Size : 48807808 (46.55 GiB 49.98 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

Update Time : Tue Nov 25 10:18:33 2014
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

Layout : far=2
Chunk Size : 64K

Name : einstein-db1.atlas.local:0 UUID : dcd28f40:a020f822:d87a5b91:31bedccf
Events : 38

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 33 1 active sync /dev/sdc1
2 8 49 2 active sync /dev/sdd1
3 8 65 3 active sync /dev/sde1

But life always tells you your initial thoughts are wrong, so we would like to expand this to use 75% of each SSD.

Without much thinking, I would simply follow the wiki page, mark a device as failed, remove it, repartition it, add it again, and wait for sync to complete. Repeat for all 4 devices and finally --grow with mdadm (followed by xfs resizing) - and of course, all online, while machine is in flight.

The question now is, will this really work with RAID10 or would one need to change it to RAID0 first, then perform this exercise and convert back to RAID10 afterwards (and possibly lose all data because I will inadvertently will make a serious typo somewhere ;)).

cheers

Carsten

Signature · 4 lines
Dr. Carsten Aulbert - Max Planck Institute for Gravitational Physics
Callinstrasse 38, 30167 Hannover, Germany
phone/fax: +49 511 762-17185 / -17193
https://wiki.atlas.aei.uni-hannover.de/foswiki/bin/view/ATLAS/WebHome
#1 lore raw

Hi

Am 2014-11-25 10:25, schrieb Carsten Aulbert:

Quoted 5 lines

Without much thinking, I would simply follow the wiki page, mark a device as failed, remove it, repartition it, add it again, and wait for sync to complete. Repeat for all 4 devices and finally --grow with mdadm (followed by xfs resizing) - and of course, all online, while machine is in flight.

That is exactoy what I did with my RAID 10 a bit more than a year ago. It basically worked, but there was one caveat... some part (the ---grow?) which required a certain kernel version for which I had booted a live CD back then...

The thing is, I can't exactly remember what the caveat was. And as I'm about to grow the RAID again (having replaced all hard drives already), I have been looking for the related mails in the archive of this list, but I can't seem to find them...

So I guess we'll have to hope that Neil replies again.

Chris

#2 lore raw
Quoted 14 lines · On Tue, 25 Nov 2014 12:01:58 +0100 [email protected] wrote:

Hi

Am 2014-11-25 10:25, schrieb Carsten Aulbert:

Quoted 5 lines

Without much thinking, I would simply follow the wiki page, mark a device as failed, remove it, repartition it, add it again, and wait for sync to complete. Repeat for all 4 devices and finally --grow with mdadm (followed by xfs resizing) - and of course, all online, while machine is in flight.

That is exactoy what I did with my RAID 10 a bit more than a year ago. It basically worked, but there was one caveat... some part (the ---grow?) which required a certain kernel version for which I had booted a live CD back then...

Quoted 6 lines

The thing is, I can't exactly remember what the caveat was. And as I'm about to grow the RAID again (having replaced all hard drives already), I have been looking for the related mails in the archive of this list, but I can't seem to find them...

So I guess we'll have to hope that Neil replies again.

I recommend creating some loop-back block devices and experimenting.

But I'm fairly sure that "far" RAID10 arrays cannot be reshaped at all.

NeilBrown

#3 lore raw

Am 25.11.2014 um 22:19 schrieb NeilBrown:

Quoted 1 line

But I'm fairly sure that "far" RAID10 arrays cannot be reshaped at all.

And for near it would work?

I'll try to volunteer for adjusting the RAID growing section on the RAID wiki (also regarding GPT).

Chris