diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-04-28 00:50:03 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-04-28 00:50:03 +0200 |
commit | f9792380f7b2f9bfaab9361378e8e72bb67e77a2 (patch) | |
tree | e6f1f4c4f845cc62f1a23e1bd6c8488a3f0682bf /hooks/lvm2 | |
parent | e93d33835fc2078eafe5c4d923367e1e95f66822 (diff) | |
download | mkinitcpio-f9792380f7b2f9bfaab9361378e8e72bb67e77a2.tar.gz mkinitcpio-f9792380f7b2f9bfaab9361378e8e72bb67e77a2.tar.xz |
* Initial attempt to get the device-mapper stuff in order
* Moved 'init' to /lib/initcpio/init to be more in-tune
with the naming scheme
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@27 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'hooks/lvm2')
-rw-r--r-- | hooks/lvm2 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hooks/lvm2 b/hooks/lvm2 new file mode 100644 index 0000000..a1788ce --- /dev/null +++ b/hooks/lvm2 @@ -0,0 +1,18 @@ +# vim:set ft=sh: +run_hook () +{ + mkdevice () { /bin/mknod "/dev/mapper/control" c ${1} ${2}; } + + if [ -e "/sys/class/misc/device-mapper" ]; then + /bin/modprobe -q dm-mod >/dev/null 2>&1 + read dev_t < /sys/class/misc/device-mapper/dev + OLDIFS=$IFS; IFS=: + mkdevice $dev_t + IFS=$OLDIFS + + msg "Scanning logical volumes..." + /bin/lvm vgscan --ignorelockingfailure + msg "Activating logical volumes..." + /bin/lvm vgchange --ignorelockingfailure -ay + fi +} |