Update instructions for manual LVM start + fix LVM detection for lvm boot option
authorMichael Prokop <mika@grml.org>
Fri, 26 May 2017 21:15:14 +0000 (23:15 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 26 May 2017 21:17:51 +0000 (23:17 +0200)
service lvm2-lvmetad doesn't do what we assumed it does.
Instead 'Start lvm2-pvscan@name' allows startup of the
given LV or VG (which is actually nice).

Also we need to explicitely execute `vgchange -a` to
start any present LVs.

Closes grml/grml#31

autoconfig.functions

index da09d89..7638ecc 100755 (executable)
@@ -1717,15 +1717,17 @@ config_lvm(){
           einfo "You seem to have logical volumes (LVM) on your system."
           eindent
           if $SYSTEMD ; then
           einfo "You seem to have logical volumes (LVM) on your system."
           eindent
           if $SYSTEMD ; then
-            einfo "Just run 'Start lvm2-lvmetad' to activate them or boot using 'lvm' as bootoption for autostart."
+            einfo "Just run 'Start lvm2-pvscan@name' to activate LV or VG 'name' or boot using 'lvm' as bootoption for autostart."
           else
             einfo "Just run 'Start lvm2' to activate them or boot using 'lvm' as bootoption for autostart."
           fi
           eend 0
           if checkbootparam 'lvm' ; then
           else
             einfo "Just run 'Start lvm2' to activate them or boot using 'lvm' as bootoption for autostart."
           fi
           eend 0
           if checkbootparam 'lvm' ; then
-             einfo "Bootoption LVM found. Searching for logical volumes:"
+             einfo "Bootoption LVM found. Searching for logical volumes and enabling them:"
              if $SYSTEMD ; then
              if $SYSTEMD ; then
-               service_wrapper lvm2-lvmetad start ; eend $?
+               service_wrapper lvm2-lvmetad start
+               vgchange -ay
+               eend $?
              else
                service_wrapper lvm2 start ; eend $?
              fi
              else
                service_wrapper lvm2 start ; eend $?
              fi