Skip to contentSkip to conversation

LVM2 striping or md raid0

linux-lvm Kelly Byrd 3 participants 5 messages Sep 23, 2007 – Sep 26, 2007

lore
Share & tools
lore

Kelly Byrd

author
#0 lore raw

Two questions really:

I'm going to use lvm to partition up 4 equal size partitions. I can either use the md driver to RAID0 them the make /dev/md0 my PV, or just use the 4 partitions as PVs and stripe across them.

How does lvm2 striping compare with md's RAID0 as far as speed? I don't quite get how it stripes on chunk sizes smaller than a PE, but a 4MB stripe size seems crazy.

Finally, what's the tuning advice for LVM2 striping? I usually create my RAID0 or RAID5 with 128k chunk sizes, is it similar for LVM2 striping?

author
#1 lore raw
Quoted 8 lines · Kelly Byrd

Two questions really:

I'm going to use lvm to partition up 4 equal size partitions. I can either use the md driver to RAID0 them the make /dev/md0 my PV, or just use the 4 partitions as PVs and stripe across them.

Quoted 9 lines

How does lvm2 striping compare with md's RAID0 as far as speed? I don't quite get how it stripes on chunk sizes smaller than a PE, but a 4MB stripe size seems crazy.

Finally, what's the tuning advice for LVM2 striping? I usually create my RAID0 or RAID5 with 128k chunk sizes, is it similar for LVM2 striping?

anyone?

#2 lore raw
Quoted 15 lines · Kelly Byrd
Quoted 11 lines · Kelly Byrd

Two questions really:

I'm going to use lvm to partition up 4 equal size partitions. I can either use the md driver to RAID0 them the make /dev/md0 my PV, or just use the 4 partitions as PVs and stripe across them.

How does lvm2 striping compare with md's RAID0 as far as speed? I don't quite get how it stripes on chunk sizes smaller than a PE, but a 4MB stripe size seems crazy.

Quoted 7 lines
Quoted 5 lines

Finally, what's the tuning advice for LVM2 striping? I usually create my RAID0 or RAID5 with 128k chunk sizes, is it similar for LVM2 striping?

anyone?

This is merely my own opinion, but md was designed to be THE software raid mechanism. So, my preference would be to establish a RAID md device and make that into a PV.

Of course, I don't believe in non-RAID (i.e. RAID0) anyhow. Maybe someone else will chime in on this one.

Signature · 2 lines
Chris Cox
Sr. Unix Sys Admin
#3 lore raw
Quoted 3 lines · Chris Cox

This is merely my own opinion, but md was designed to be THE software raid mechanism. So, my preference would be to establish a RAID md device and make that into a PV.

This is FOSS, and choice is king. There is no "THE" desktop, you can choose from KDE, Gnome, or a host of desktop-like window managers. It is entirely in character to have 2 different RAID mechanisms.

That said, LVM raid will likely always be restricted to RAID0 and RAID1, because these are simple and efficient to implement as part of what LVM does anyway. For RAID5, etc, your only choice in linux will be hardware or the md driver.

Quoted 2 lines

Of course, I don't believe in non-RAID (i.e. RAID0) anyhow. Maybe someone else will chime in on this one.

RAID0 on top of RAID1 or (RAID1 on RAID0) gives you mirroring plus high bandwidth. For RAID5, I'd go with hardware.

Signature · 4 lines
	      Stuart D. Gathman <[email protected]>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
#4 lore raw
In reply to Chris Cox
Quoted 3 lines · Chris Cox

This is merely my own opinion, but md was designed to be THE software raid mechanism. So, my preference would be to establish a RAID md device and make that into a PV.

I prefer RAID1 integrated with LVM - it can handle mixed disk sizes with ease. On a particular system with AIX LVM (where it has been integrated for some time), We started with 3 512M disks, then added a 1G, then 2 4Gs, then an 18G. The filesystems were RAID1 at all times, and were expanded and PEs moved between devices all with the filesystems mounted and active. Linux LVM can do all this now, it is just a little kludgier at present.

With md, you have to arrange matching partition sizes by hand. It *is* possible, however, to move live/active md partitions between devices manually if you are careful (allocate partition on new device and add as mirror, sync, set faulty and remove old partition).

Changing the partition table requires a reboot (or deactivating/unmounting all partitions on the drive), so that limits what you can do live with md - unless you have the foresight to divide your disks into roughly equal sized partitions. But that, of course, is what LVM does for you automatically.

Signature · 4 lines
	      Stuart D. Gathman <[email protected]>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.