[linux-lvm] ext3 on LVM2 on RAID 5
rupert.hair at ntlworld.com
Fri Aug 6 08:33:13 UTC 2004
Hi Peter & other LVM people,
Thanks for your reply. I have had the array setup for a few days now and its
already half full :-). Luckily I decided on the same chunk size, PE size and
stride values as you have recommended. I'm very pleased with the performance
and the CPU utilisation even under full speed write to the RAID 5 is nice and
low. I would recommend this setup to anyone who wants the best £:GB ratio,
redundancy and the ability to add more drives later.
One thing that I'm still wondering about is does the PE size effect performance?
I presumed that, as its only a logical devision of the data (i.e. it does not
control striping of the data), it would have no effect on the performance.
Quoting "Peter A. Castro" <doctor at fruitbat.org>:
> I run this kind of setup with 6 SCSI drives and 4 SATA drives and have
> not had any problems. The LVM and RAID how-to's are pretty complete as
> to how this all hangs together. Basically the stride is your chunk-size
> divided by your filesystem block size.
Are there any howtos specifically for LVM on RAID? I cobbled my setup together
with help from the Software RAID howto
(http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html) and a few other random
docs found using google.
> Eg: I have a chunk-size of 128k, and a physical extent size of 16M. I
> use a 4k block size in mke2fs and thus the stride is 128k/4k = 32. I'd
> suggest you use mdadm instead of the raidtools as it's a heck of a lot
> easier to use.
> $ mdadm --create /dev/md0 --chunk=128 --level=5 --raid-devices=6 \
> /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1
> $ vgscan # assumes you've setup proper mask to look only at /dev/md?
> $ pvcreate /dev/md0
> $ vgcreate --autobackup y --physicalextentsize 16M vg0 /dev/md0
> $ lvcreate --autobackup y --size 50G --name worklv vg0
> $ mke2fs -b 4096 -f 4096 -j -O sparse_super -R stride=32 /dev/vg0/worklv
Thats a great guide. Thanks.
> I see from below you are using both PATA and SATA. You might want to
> partition these drives into separate raid arrays (ie: all PATA in one,
> all SATA in another). The PATA will be slower than the SATA. If you mix
> the drives in the array your performance might suffer. I'd suggest you
> try mixing and matching and then run some disk performance tests on the
> raw raid partitions before deciding on a final configuration. Hint: you
> don't need to create huge arrays for these tests. Use smaller disk
> partitions for your tests to reduce the amount of time spent on building
> the test arrays. When you've come up with the best performing
> combination, then you can re-create the partitions full size.
Are the PATA only slower when you have two of them on one channel? In my setup
the PATA and SATA disks are the same models (the PATA are a bit older though).
As far as I understand it no disks available at the moment are fast enough to
out pace an ATA100 or 133 PATA controller so the SATA shouldn't be faster just
because they have ATA150.
Thanks again to Peter and everyone who has contributed to LVM,
More information about the linux-lvm