Re: [Hampshire] RAID and LVM boot disks

Top Page

Reply to this message
Author: Anton Piatek
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] RAID and LVM boot disks
2009/6/4 Paul Tansom <paul@???>:
> ** Andy Smith <andy@???> [2009-06-02 21:41]:
>> On Tue, Jun 02, 2009 at 02:52:44PM +0100, Paul Tansom wrote:
>> > Before I start rejigging the Ubuntu live CD I thought I'd see if anyone knew of
>> > an alternative that may save me some time. What I'm looking for a is a boot CD
>> > that has RAID and LVM support built in. Ideally it would automatically detect
>> > the RAID and mount any partitions on there, including any on LVM, but I don't
>> > mind a bit of manual work.
>>
>> Would have thought most of the live CDs these days would support
>> software RAID and LVM - you need devicemapper at least for most of
>> the encrypted disk solutions anyway.
>
> I guess it depends on the purpose of the live CD. If it is a recovery/utility
> CD then possibly. If it is a try before you install CD then possibly not. I
> assume this is why it isn't on the Ubuntu live CD. There's not need for support
> on the CD to allow you to try the OS, but it is available during the install
> process if you want to set it up on your HD.
>
>> Sorry I can't help more, but as an aside..
>>
>> If your goal is to make administering the systems easier, then I
>> would strongly suggest putting / and /boot outside of LVM.  Yes it
>> is perfectly possible to have / in LVM (/boot a bit trickier, but
>> doable in some circumstances).  It will work flawlessly almost all
>> the time, but when it breaks it is a real pain to sort out.
>
> / is outside the LVM (after a bit of experimentation along the way to see what
> could and couldn't be done - complicated by the need for a BIOS upgrade on my
> PATA card). That is just on a RAID mirror, so easy enough to read as a plain
> ext2 partition if necessary. Now I've typed that I'm trying to remember whether
> I put that in the original post and if so whether I quoted /boot instead of /.
>
>> Root on a "real" block device relies less on your initrd, and its size
>> rarely needs to change so you can generally just make it 1G to start
>> with and forget about it.  If any part of it develops a new usage
>> profile then you can just put that bit in an LV of its own, just as
>> you did for /var, /usr/ /home and whatever else.
>
> I have to say I've come very close to sticking with just a RAID mirror.
> Resizing isn't something I've needed to do more than once before, and I did
> that easily enough during the migration process to two large disks by simply
> partitioning a new drive for the extra space, then swapping it for one of my
> RAID mirror drives and sync'ing, then doing the same for the second drive and
> finally growing the file system into the extra space available for each
> partition. Not done live, but I needed to shutdown to fit the drives! Snapshots
> sound of interest though, and I decided to try it out with this install. I've
> not moved any live data across yet, so I'm not fully committed!
>
>> > I've just tried a Knoppix CD, but sadly that won't boot (I need to explore the
>> > VGA drivers), and I'll probably look at Morphix before starting any custom
>> > builds.
>>
>> That's a shame; for a long while I've used a remastered knoppix cd
>> which does everything over serial as my "just boot it off this"
>> instruction to remote hands in far off places..
>
> Yes, I've had little to no success getting Knoppix booting each time I've tried
> it. I won't say I've never managed to boot it, but I can't quote a time when I
> have. I downloaded both Knoppix and Morphix around Knoppix 3.1 era, and Morphix
> worked better for me. I've used LinuxBBC far more times than either though.


I have my system setup as follows - 2 disks, /boot being a small raid
1 partition on both of them.
The rest of the disks is a raid1 lvm image. The reason I did this as
it means I can add another pair of disks, set them as raid1 too and
them throw another LVM PV on top of them. Using LVM I can then either
easily run with all 4 disks, or if I don't need the two smaller ones I
can just tell LVM to remove them from the VG. This way the system
handles migration between disks for me.

The only catch is that with Grub 1 you have to be careful about having
a correct initrd and all the config for lvm+raid correct when building
that initrd or it wont boot (thankfully a kernel upgrade keeps the old
kernel which is great as a backup for when something breaks).
I believe raid2 can cope with LVM so that might work better. /boot/ is
accessed by grub as a normal ext3 partition so the raid simply allows
either disk to fail completely and me still be able to boot (though I
suspect grub will need manual intervention if it is the first disk
that fails as the config won't be happy trying to load the initrd off
the dead first disk)

Things are simpler with / outside of the lvm, but its not that hard to
keep it in these days

Anton


-- 
Anton Piatek
email: anton@???    
blog/photos:            http://www.strangeparty.com
pgp: [0xB307BAEF]    (http://www.strangeparty.com/anton.asc)
fingerprint: 116A 5F01 1E5F 1ADE 78C6 EDB3 B9B6 E622 B307 BAEF


No trees were destroyed in the sending of this message, however, a
significant number of electrons were terribly inconvenienced.