[YLUG] Practical LVM

Roger Leigh rleigh at whinlatter.ukfsn.org
Sat Jul 29 16:09:02 BST 2006


Ewan Mac Mahon <ewan at macmahon.me.uk> writes:

> Thanks to a recent encounter with a randomly data corrupting Asus
> A7V motherboard I'm probably looking at doing a clean install on my
> main system in the nearish future. It's currently set up with two
> disks, each partitioned identically, each pair of partitions forming
> a md software raid array.
>
> I'm thinking of doing the reinstall by dropping one disk out of the
> raids, setting up a new system on it, then having the raid sync
> everything to the other disk when it's all done; this gives me an
> opportunity to go all LVM, but how?

To boot off such a system, you need to use a kernel with initramfs, so
it can set up RAID and LVM before mounting root.  You'll need a recent
LILO, if you use lilo.  I don't know if GRUB supports it yet (unlike
LILO, it would need to start up the array and read the LV filesystem).

You might need a bang up-to-date kernel and initramfs-tools, udev,
etc..

A simpler alternative is to have a small non-RAID root partition on
the first disk, so you don't need that.  This kind of defeats the
point of the RAID setup, though.

> - md RAID the two disks and have LVM on top of the md device?

Yes.  I have done this, and been very happy with it (I didn't boot off
the array, however).

> - Do the raid with LVM (is that even possible?)?

Yes.  This is done with device-mapper (dmraid).  I haven't done this
myself; it's less mature than the above, but everything is managed
with device-mapper.  md may be replaced by this in the future, IIRC
(or merged with it).  I can't say anything positive or negative about
it, having not tried it.

> - What file system? There's not much point in resizable 'partitions'
>   without resizable contents.

ext3, XFS, JFS.  I personally use ext3, and use /sbin/resize2fs.  I
would avoid reiser at all costs if you want any sort of data
integrity.  I would rank JFS as the next most reliable (XFS can
apparently still oops the kernel under some circumstances).

> - Is it even worth it? I've mostly happy with static partitions, and
>   don't tend to be installing/removing lots of chrooted distros.

Absolutely.  The flexibility you gain in being able to create, remove,
and resize partitions, with no pain is well worth it.  Even if you
don't do this very often, the fact that you have the option there is
great.  For example, it's trivial to add more swap.  If you ever want
to try something dangerous, you can snapshot your root filesystem, and
try it there, with no danger of screwing up the original.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please sign and encrypt your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://mailman.lug.org.uk/pipermail/york/attachments/20060729/4da47b5d/attachment.bin


More information about the York mailing list