[plug] LVM on RAID5?

Craig Ringer craig at postnewspapers.com.au
Fri Jul 9 14:44:29 WST 2004


Dean Holland wrote:
> Will LVM work correctly on RAID5

Yes.

> eg. it's not going to throw a fit when 
> I add another disk and expand the RAID5 array.

LVM has support for resizing PVs, so it should be fine. I haven't done 
this myself, though. My RAID 5 can't be resized live :-( alas.

Do make sure it works in a test environment first, though. Create a PV 
that takes up less than the entire disk, then expand it.

Also be aware of this issue if you're thinking about Linux 2.6 and LVM2:

[root at bucket root]# pvresize
   Command not implemented yet.

> Would it be easier to just use normal partitioning on the RAID5 device 
> with /var/spool as the last partition, then when expanding the array use 
> parted to expand /var/spool into the newly added free space.

Perhaps, but you'll hate yourself the first time you have to run a 
backup and can't say:

lvcreate -s -n var_spool_snap -L 1G var_spool
mount /dev/RAID5/var_spool_snap /mnt/backup/var_spool
(back up from snapshot)
umount /mnt/backup/var_spool
lvremove -f /dev/RAID5/var_spool_snap

LVM Snapshots make backups and system recovery snapshots so much easier, 
nicer, and safer that it's just crazy. LVM2 now has snapshot support 
too, so that'll work fine on 2.6. If you do need to go for LVM2 and 2.6, 
you could always partition the RAID 5 and add new PVs to the VG as you 
expand the array rather than resizing the existing one.

--
Craig Ringer




More information about the plug mailing list