[dundee] Ubuntu Install RAID 1 + LVM is a no go..

Lee Hughes toxicnaan at yahoo.co.uk
Thu Jul 31 23:36:31 BST 2008


hhmm interesting....

you seem to have / on a md raid device, and not within lvm?

is that correct?

--- On Thu, 31/7/08, Andy Smith <andy at lug.org.uk> wrote:
From: Andy Smith <andy at lug.org.uk>
Subject: Re: [dundee] Ubuntu Install RAID 1 + LVM is a no go..
To: dundee at mailman.lug.org.uk
Date: Thursday, 31 July, 2008, 6:52 PM

HI Lee,

On Thu, Jul 31, 2008 at 02:51:59PM +0000, Lee Hughes wrote:
> If I install an ubunutu machine, I go through manual partitioning, and set
up a raid 1
> mirror (using two disks). If I then tell lvm to setup on that drive (raid
device 0), the
> install then tried to parition the md device into two parts, a ext3 /boot
and the rest
> as lvm.
> 
> as we all know you can't partition raid devices, so them comes
meltdown.

Ah, OK.  You *can* partition md devices, but perhaps this is not
supported from the installer (I've never tried).

Where you're going wrong is that you're using the entire disk device
as the RAID component.  You need a /boot that is outside of LVM
because grub cannot boot from a logical volume.

So, what I advise you do is something like this, assuming that your
real disks are /dev/sda and /dev/sdb:

- Create an sda1 and sdb1 partition of about 256M, mark them as RAID
  components

- Create sda2 and sdb2 using the rest of the disks and mark those as
  RAID components

- Create md0 RAID-1 from sda1 + sdb1, use it as ext3 and mount on /boot

- Create md1 RAID-1 from sda2 + sdb2, use it as LVM PV

- Create LVM volume group from your md1 PV

- Put everything else inside that volume group

> I've tried to be clever too and create two raid device 1, for /boot
and 1 for the lvm
> but the install just tried to partition again...

That's what I do and it works for me:

Filesystem            Size  Used Avail Use% Mounted on
/dev/md2              942M  468M  427M  53% /
varrun                1.7G  188K  1.7G   1% /var/run
varlock               1.7G     0  1.7G   0% /var/lock
udev                  1.7G  124K  1.7G   1% /dev
devshm                1.7G  3.0M  1.7G   1% /dev/shm
lrm                   1.7G   39M  1.6G   3%
/lib/modules/2.6.24-19-generic/volatile
/dev/md0               89M   60M   24M  72% /boot
/dev/mapper/stoli-data
                       69G   33G   33G  50% /data
/dev/mapper/stoli-home
                       20G  1.7G   18G   9% /home
/dev/mapper/stoli-usr
                      7.9G  3.0G  4.6G  40% /usr
/dev/mapper/stoli-var
                      7.9G  2.5G  5.1G  33% /var
> I presume you've all set up raid and lvm *after* the initial install
of the o/s

No, I did it from the installer.

Cheers,
Andy

-- 
http://bitfolk.com/ -- No-nonsense VPS hosting
Encrypted mail welcome - keyid 0x604DE5DB_______________________________________________
dundee GNU/Linux Users Group mailing list
dundee at lists.lug.org.uk  http://dundee.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/dundee
Chat on IRC, #tlug on dundee.lug.org.uk


      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/dundee/attachments/20080731/5a8f4e1c/attachment.html


More information about the dundee mailing list