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

Re: debianinstaller root+raid+lvm on U30

On Mon, 11 Jul 2005 08:53:55 -0500, Adam Snodgrass wrote:
> I've been trying unsuccessfully for days now to install Debian onto a
> U30 with 2x 9GB Cheetahs using RAID+LVM.  (FWIW, a "normal" install
> works fine).  The major problem is that, no matter which version
> (stable, testing, testing daily image) of the DebianInstaller I use,
> it *refuses* to permit me to create any RAID devices.

I seem to remember (maybe from a previous thread on this list) that the
RAID features of the Debian-Installer don't work on SPARC machines.
I've certainly not been able to do that on my Netra T1 105.  However, a
RAID-1 + LVM set-up is both possible and fairly easy to achieve.  You
just need the benefit of hindsight. :-)

Root on LVM on RAID-1 is slightly harder, but I believe it's possible.
I opted for the simpler arrangement of having my root partition on a
plain RAID-1 array and a separate RAID-1 array containing various LVM
volumes.  I might get round to writing a Web page about it at some
point, but here's the gist of it.

1. Boot the 2.6 Debian-Installer image over the network and install a
minimal system on /dev/sdb.

2. Boot to the new installation and partition and partition /dev/sda
like this:

Disk /dev/sda (Sun disk label): 255 heads, 63 sectors, 17849 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Flag    Start       End    Blocks   Id  System
   /dev/sda1             1       523   4192965   fd  Linux raid autodetect
   /dev/sda2           523       654   1052257+  fd  Linux raid autodetect
   /dev/sda3             0     17849 143372092+   5  Whole disk
   /dev/sda4           654     17849 138118837+  fd  Linux raid autodetect

Note that the first partition starts at cylinder 1.  This is to leave
room for the Sun disk label and bootloader.

3. Install Sarge onto an ext3 filesystem in /dev/sda4.  Don't bother
with swap.

4. Boot to this installation ('boot disk0:3' at the OpenBootPROM prompt)
and set things up as desired.  Install lvm2 and mdadm (removing
/etc/mdadm/mdadm.conf).  Build a custom kernel (non-initrd is much
easier) that supports RAID-1 and LVM.  Repartition /dev/sdb to match
/dev/sda, and correct the partition types for /dev/sda.  Reboot.

5. Create RAID-1 arrays: /dev/md0 = /dev/sda1 + /dev/sdb1, /dev/md1 =
/dev/sda2 + /dev/sdb2.  Create an ext3 filesystem in /dev/md0 and create
a swap area in /dev/md1.  Mount /dev/md0 somewhere and copy your root
filesystem there ('cp -ax / /mnt).  Edit /mnt/etc/fstab, and add an
entry to /etc/silo.conf with /dev/md0 as the root filesystem (and
everything else unchanged).  Reboot and select this new boot entry.

6. You should now have /dev/md0 mounted as root.  Complete the root
filesystem switch by editing /etc/silo.conf accordingly, and running
silo.  You may be able to acheive the same effect by running 'silo -r
/mnt' in the previous step.  Add /dev/md1 as swap in /etc/fstab.  Reboot
and make sure everything works.  Convince yourself that you're booting
with the SILO configuration file in /dev/md0, not the one in /dev/sda4.

7. Create the final RAID-1 array (/dev/md2 = /dev/sda4 + /dev/sdb4).
Set it up as an LVM volume group ('pvcreate /dev/md2; vgcreate /dev/md2)
and create whatever logical volumes you wish.

Of course, there's nothing to stop you from putting your swap partition
on LVM.  And as I said before, I believe it's possible to have your root
partition on LVM; you just need to be careful.  Finally, this reply may
not solve your problem at all, but if it helps someone else to achieve
what I spent a few weeks scratching my head over then all is not lost.


Reply to: