You are not logged in.

#1 2010-09-18 11:48:29

otterfox
Member
Registered: 2010-08-05
Posts: 21

[Solved] Extending RAID1 array with more disks.

Hi,

This requires some explaining.
Say that I have a 2*1TB disks and 2*2TB disks.
Currently I have /dev/md0 as /boot between the 1*1TB disks. /dev/md1 is encrypted with dm_crypt and has LVM inside it.

I would like to know if it's possible to extend the RAID1 array to have a total usable space of 3TB by adding 2*2TB disks onto the end of the existing RAID1 array?
Would I need to kill my encryption and put that inside the LVM and span then the LVM across 2 RAID1 ararys, /dev/md1 and /dev/md2 (the 2*2TB disks)?

Last edited by otterfox (2010-09-20 08:16:19)


<insert hardware wankery>

Offline

#2 2010-09-18 12:39:59

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [Solved] Extending RAID1 array with more disks.

You can't "extend" RAID-1. It is a mirror system, so all you can do is add additional mirrors of the same data.

You will have to create a new RAID-1 (md2) and then either:
a) Create a RAID-0 from md0 and md2; or
b) Consolidate the 2 RAID-1 arrays using LVM.

Either way I don't think LUKS supports growing and/or shrinking so you'll probably have to recreate it.

EDIT: Really bad spelling tonight sad

Last edited by fukawi2 (2010-09-18 12:40:33)

Offline

#3 2010-09-18 13:40:47

otterfox
Member
Registered: 2010-08-05
Posts: 21

Re: [Solved] Extending RAID1 array with more disks.

fukawi2 wrote:

You can't "extend" RAID-1. It is a mirror system, so all you can do is add additional mirrors of the same data.
You will have to create a new RAID-1 (md2) and then either:
a) Create a RAID-0 from md0 and md2; or
b) Consolidate the 2 RAID-1 arrays using LVM.
Either way I don't think LUKS supports growing and/or shrinking so you'll probably have to recreate it.

Yup, went off and asked on IRC and that's pretty much what I got back, either make a RAID10 array out of 2 RAID1 arrays combined in a RAID0 array, add PVs to VGs in LVM.

Thanks, for your help.


<insert hardware wankery>

Offline

#4 2010-09-20 08:20:25

otterfox
Member
Registered: 2010-08-05
Posts: 21

Re: [Solved] Extending RAID1 array with more disks.

I would just like to add that there are some issues, for example if you wanted to grow one of you RAID-1 arrays to have a larger size, it's very difficult/hacky to actually increase the LVM. And also, RAID-0 with mdadm doesn't support growing.

Apparently the way everyone does it is just has matching disks. For example if you have a RAID-6 array with 6 1TB disks and you wanted more space, you'd go out and buy 6 2TB disks and slowly rebuild the array with 2TB disks.


<insert hardware wankery>

Offline

Board footer

Powered by FluxBB