[arch-commits] Commit in lvm2/trunk (PKGBUILD lvm2_hook lvm2_install)
Thomas Bächler
thomas at archlinux.org
Thu Nov 1 00:19:25 UTC 2012
Date: Wednesday, October 31, 2012 @ 20:19:25
Author: thomas
Revision: 170084
lvm2: Add autoactivation in initramfs
Modified:
lvm2/trunk/PKGBUILD
lvm2/trunk/lvm2_hook
lvm2/trunk/lvm2_install
--------------+
PKGBUILD | 4 ++--
lvm2_hook | 24 ++++++------------------
lvm2_install | 10 ++++------
3 files changed, 12 insertions(+), 26 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-10-31 23:45:20 UTC (rev 170083)
+++ PKGBUILD 2012-11-01 00:19:25 UTC (rev 170084)
@@ -22,8 +22,8 @@
lvmetad.socket)
sha1sums=('077425115b164c335a9930df745943e9ea666a8a'
'4713c852fc668e6fbd36ff7c6b5675b10a95a0f8'
- '3e1680f9b76ce9150d08865d99db90fd15532271'
- 'cedc9948123c870f9c5aa3357d0075b41a9c8135'
+ '2960759b411e93fb2377b6a259eb71d426b51dd9'
+ 'ff0fdf0a3005a41acd4b36865056109effc3474b'
'f6a554eea9557c3c236df2943bb6e7e723945c41'
'ccefad65fde3d50331a42b0e90a1539dc7c8b9e4'
'8bc78727dc3a15243eec72032688b5b65689bc5b'
Modified: lvm2_hook
===================================================================
--- lvm2_hook 2012-10-31 23:45:20 UTC (rev 170083)
+++ lvm2_hook 2012-11-01 00:19:25 UTC (rev 170084)
@@ -1,24 +1,12 @@
#!/usr/bin/ash
-run_hook() {
- local pvdev
+run_earlyhook() {
+ mkdir /run/lvm
+ lvmetad
+}
- modprobe -q dm-mod >/dev/null 2>&1
-
- # If the lvmwait= parameter has been specified on the command line
- # wait for the device(s) before trying to activate the volume group(s)
- for pvdev in ${lvmwait//,/ }; do
- poll_device ${pvdev} ${rootdelay}
- done
-
- msg "Activating logical volumes..."
- [ -d /etc/lvm ] && lvm vgscan
-
- if [ -n "$quiet" ]; then
- lvm vgchange --sysinit -a y >/dev/null
- else
- lvm vgchange --sysinit -a y
- fi
+run_cleanuphook() {
+ kill $(cat /run/lvmetad.pid)
}
# vim: set ft=sh ts=4 sw=4 et:
Modified: lvm2_install
===================================================================
--- lvm2_install 2012-10-31 23:45:20 UTC (rev 170083)
+++ lvm2_install 2012-11-01 00:19:25 UTC (rev 170084)
@@ -7,24 +7,22 @@
done
add_binary "/sbin/lvm"
+ add_binary "/sbin/lvmetad"
add_binary "/sbin/dmsetup"
add_file "/usr/lib/udev/rules.d/10-dm.rules"
add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
+ add_file "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+ add_file "/etc/lvm/lvm.conf"
add_runscript
}
help() {
cat <<HELPEOF
-This hook loads the necessary modules for an LVM2 root device.
-
-The optional lvmwait= parameter followed by a comma-separated
-list of device names can be given on the command line.
-It will cause the hook to wait until all given devices exist
-before trying to scan and activate any volume groups.
+This hook enables LVM2 volumes in initramfs.
HELPEOF
}
More information about the arch-commits
mailing list