blob: ff5e9def551848c3b364580033b9868c798bc26b [file] [log] [blame]
http://poochiereds.net/svn/lvm2/
This is the lvm2create_initrd script written by Miguel Cabeca, with some small
modifications by myself.
Here are some other requirements and tips for using it:
1) this script uses busybox on the initrd image, hence busybox needs to be
installed when you create your initrd.
2) Make sure /etc/lvm/lvm.conf is set up correctly before running this. In
particular, if you're using LVM on RAID, make sure that you have a filter that
excludes the RAID component devices (this may not be necessary with the latest
patch by Luca Berra, but it doesn't hurt).
3) This initrd image does not support modules. If you need to plug in any
kernel modules during the initrd phase, then you'll need to hand-modify the
image.
4) The generated initrd image supports an 'lvm2rescue' mode as well. If you add
the parameter 'lvmrescue' on the kernel command line, it will run a shell at
the end of the initrd 'init' script. This can be helpful when trying to fix a
corrupt root volume or root LVM2 volume group.
5) No userspace md tools are installed, so if you're using LVM on RAID, then
you'll probably want to mark your RAID partitions as type 'fd' so that the
kernel will start them automagically (or hand-modify the image).
6) I'm not sure if devfs will work with this or not. udev, however does work,
and is recommended. Because the dm-* devices use dynamically allocated major
and minor numbers, kernel upgrades and the like can renumber your devices. To
fix this, you need to run a 'vgscan --mknodes' prior to fscking and mounting
your rootfs. Doing this with a static /dev creates a problem though -- you
will be modifying the root filesystem before it has been fsck'ed. udev gets
around this by mounting a ramdisk over /dev, but you'll probably need to add
a startup script that creates devices in /dev. The lvm2udev script in this
directory is an example of such a beast.
--
Jeffrey Layton <jtlayton@poochiereds.net>