[clug] Mirroring boot disk on Debian

Paul Hampson Paul.Hampson at anu.edu.au
Wed Nov 17 03:57:29 GMT 2004


On Wed, Nov 17, 2004 at 02:08:36PM +1100, Martin Pool wrote:
> LVM is a separate layer to RAID.  Typically you will mirror your disks
> into md0, then run LVM on top of that, then filesystems on top of the
> logical volumes.

>   http://www.aplawrence.com/Linux/lvm.html

> I don't know if the Debian installer lets you configure this.  I would
> try booting into a shell, setting up your disks, then continuing on.

The Debian installer _almost_ supports it. You need a non-LVM partition
to boot from (can be MD, but the installer will fret that it can't boot
from it... grub handles it OK though, so you can ignore this complaint)
and then you can have a second md partition with all your LVM volumes on
it (or any other LVM on MD layout you wish)

However, the installer won't create LVM physical volumes on MD volumes,
so you have to create your MD volumes in the installer, then hop into a
shell and use pvcreate and vgcreate to create your physical volume(s) (I
did this with one PV for a single MD Raid1 pair, and a single VG
"Mirrored" on that, so it was almost a degenerate case) and then go back
into the partitioner program and out again (or format the other md
partition, just do something to make it reload the partition table) and
then use the LVM support in the partitioner to make your LVM LVs. The
LVM support can also create your VGs, but I've never tried that, so I
don't know if it works with hand-made PVs.

If you need more help, there's a bug report or two against
debian-installer in the Debian BTS with instructions. However, most of
the problems listed have been fixed:

	* debootstrap includes lvm2, lvm-common and mdadm if it detects
	partitions of those types. (Automatically in unattended mode,so you
	may have to dpkg-reconfigure them after reboot if you so wish.)

	* Debian 2.6 kernels include the lvm and mdadm modules.

	* mkinitrd from initrd-tools package detects if you're running
	lvm and/or md and includes appropriate code to use them.

	* grub knows about md partitions

	* All the above tools have migrated through to /Testing, but I
	was using daily Debian-Installer PXE images, so a Debian-installer
	RC image may be too old... But I was doing this in early September,
	so it should all be good now.

	The main outstanding issue is LVM PVs on MD partitions, AFAIK.
-- 
-----------------------------------------------------------
Paul "TBBle" Hampson, MCSE
7th year CompSci/Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
Paul.Hampson at Anu.edu.au

"No survivors? Then where do the stories come from I wonder?"
-- Capt. Jack Sparrow, "Pirates of the Caribbean"

This email is licensed to the recipient for non-commercial
use, duplication and distribution.
-----------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20041117/0c1202e7/attachment.bin


More information about the linux mailing list