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