Add the basics for LVM support

For LVM, we need to do activation of the volume group within the initrd.
Stick lvm tools into the initrd as well as a (basic and stupid) udev rule
to run vgchange -ay.  Ultimately we want to get a better rule for this into
udev proper
master
Jeremy Katz 2008-12-15 14:07:55 -05:00
parent 35c5d61b82
commit 7a18688c32
2 changed files with 15 additions and 1 deletions

View File

@ -16,13 +16,14 @@ tmpdir=$(mktemp -d)

# executables that we have to have
exe="/bin/bash /bin/mount /bin/mknod /bin/mkdir /sbin/modprobe /sbin/udevd /sbin/udevadm /sbin/nash /bin/kill /sbin/pidof /bin/sleep"
lvmexe="/sbin/lvm"
# and some things that are nice for debugging
debugexe="/bin/ls /bin/cat /bin/ln /bin/ps /bin/grep /usr/bin/less"
# udev things we care about
udevexe="/lib/udev/vol_id"

# install base files
for binary in $exe $debugexe $udevexe ; do
for binary in $exe $debugexe $udevexe $lvmexe ; do
inst $binary $tmpdir
done


13
rules.d/64-lvm.rules Normal file
View File

@ -0,0 +1,13 @@
# hacky rules to try to activate lvm when we get new block devs...
#
# Copyright 2008, Red Hat, Inc.
# Jeremy Katz <katzj@redhat.com>


SUBSYSTEM!="block", GOTO="lvm_end"
ACTION!="add|change", GOTO="lvm_end"

ENV{ID_FS_TYPE}=="LVM2_member", RUN+="/sbin/lvm vgchange -ay"


LABEL="lvm_end"