[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Software RAID, LVM, and LILO on amd64 sarge

On Saturday 05 November 2005 00:22, Thomas F. O'Connell wrote:
> On Nov 4, 2005, at 5:37 PM, Thomas F. O'Connell wrote:
> > On Nov 4, 2005, at 4:38 PM, Gilles wrote:
> >>> During partitioning, I set up both software RAID1 and LVM. After
> >>> partitioning, I tried to install LILO in the MBR on /dev/md0, but it
> >>> didn't work. I tried advanced mode and tried /dev/mapper/vg-root as
> >>> an installation target, but that was invalid, as well.
> >>
> >> I think that you have to use an actual disk or disk partition as
> >> target.
> >> At least, that's how I did it with "grub" where a disk is
> >> specified with
> >> something like "(hd0)" and a partition as "(hd0,0)".
> >> To have the loader available, even if one of the disks in the array
> >> fails, you just install it on every disks that composes "/dev/md0".
> >
> > I thought I had read that grub didn't play well with sarge.
> >
> > Unfortunately, now I'm struggling even to get RAID1 set up the way
> > I'd like, even without LVM.
> >
> > Maybe this is about the methodology I'm using rather than a problem
> > with the installer, although I would expect the installer to be a
> > little more intuitive. I have a two-drive machine (two 250 GB
> > drives), and I'd like to configure them in a RAID1 such that each
> > disk is bootable.
> >
> > I thought that I could just configure each disk with a single
> > physical RAID volume partition and then create a software RAID in
> > which I could create as many partitions as I want, including a /
> > boot partition if need be.
> >
> > But I'm running into issues with seeing the remainder of the disk
> > space be flagged as "unusable" as soon as I create a partition in
> > the RAID1.
> Okay. Sorry for the noise of my reply. I read this a little more
> closely:
> http://www.tldp.org/HOWTO/Software-RAID-HOWTO-11.html#ss11.1
> But this leaves me with my original problem.
> What I'm doing now is:
> 1. Set up a monolithic physical volume for RAID on each disk.
> 2. Configure RAID1 using these volumes.
> 3. Configure a single LVM volume group (vg) with four logical volumes
> in it: root, swap, var, and home. I don't specifically create a
> volume or mount point for /boot, but I haven't gathered that that
> should be necessary.

This isn't specific to 64-bit systems.  Basically, a bootstrap loader such as 
LILO has only a very primitive filesystem; it expects the kernel to be in a 
contiguous group of sectors on a single disk.  Only once the kernel is 
loaded, decompressed and running do the other, more complex file systems 
become available.

If you are using software RAID then you must have a /boot partition which is a 
non-RAID, ext3 or ext2 partition; and a separate swap partition on each drive  
{you don't need RAID on swap; if that goes down, the kernel's going down 
anyway.  Not to mention it's a serious performance issue}.  Note, the 
bootstrap loader *doesn't* care about / -- when you configure it by 
running /sbin/lilo, the kernel is already running, and it will be able to 
find the sector where the kernel begins.  So your root partition can {and 
probably should} be RAID.

Build your system with a few megs ext3 / ext2 partition near the beginning, 
then a gig or so of swap  {remember you will have 2 swap files, 1 on each 
drive}  and then your main partitions.  Once your system is installed then 
you will have a boot partition on sda1 but not on sdb1.  So you now should 
copy over the contents of sda1 to sdb1 using dd.  In effect you are doing 
RAID manually!  But this only needs to be done whenever you compile a new 

delta echo bravo six four at earthshod dot co dot uk

Reply to: