[linux-lvm] Software raid on top of lvm logical volume

Scott Serr serrs at theserrs.net
Mon Nov 1 06:46:00 UTC 2004


I've done something like Markus explained.  I had this email ready to go 
a couple days ago, but the compose window was hidden for a while... I 
hope it's not too stale for the original poster of this thread:

2.4.26 with latest LVM2 works well.  I did something crazy, alot of 
people probably don't understand why.

I have software RAID5.

md0 = hda5 hdb5 hdc5 hdd5 hde5
md1 = hda6 hdb6 hdc6 hdd6 hde6
md2 = hda7 hdb7 hdc7 hdd7
md3 = hda8 hdb8 hdc8 hdd8

Then I have just one big vgdata and one lvdata.

Why would I want to do this?  I couldn't find any other way to have 
redundancy and be flexible.  If I replace a physical disk with a larger 
one, for instance hde needs to be bigger so I can make md2 and md3 
stretch across that disk too...  then I am able to do pvmove from md2 to 
a scratch disk, recreate md2 across hda7-hde7, then pvmove back.

-Scott

Markus Baertschi wrote:

> Michael T. Babcock wrote:
>
>>
>> I've thought about this numerous times -- there is the distinct 
>> resizing advantage.  Namely, if I create a software RAID partition, I 
>> can't resize it afterward without destroying it.  I have for example, 
>> on occasion, had three disks set up where 1/3 of each was devoted to 
>> a RAID-0 very fast striping set for data transfers that had to be 
>> fast but if they were lost it wasn't critical, and 2/3 was set up as 
>> RAID-5 for reliability of another set of data.
>>
>> I understand this may not be optimal in some situations, but some of 
>> us don't have thousands of dollars for SCSI HW RAID controllers.
>
>
> You can make life easier by creating several raid arrays on the same 
> disks and tie them together with LVM.
> For example split your three 160GB drives into 4 partitions each and 
> create a raid over the three disks.
>
> sda -> sda1+sda2+sda3+sda4, etc.
> md0 = sda1+sdb1+sdc1, md1=sda2+sdb2+sdc2, etc.
>
> Markus
>




More information about the linux-lvm mailing list