]> gitweb.fluxo.info Git - backupninja.git/commitdiff
older versions (lenny) of lvm2 have a bug in vgcfgbackup that makes it so when you...
authorMicah Anderson <micah@riseup.net>
Fri, 1 Oct 2010 22:09:43 +0000 (18:09 -0400)
committerMicah Anderson <micah@riseup.net>
Fri, 29 Oct 2010 14:31:43 +0000 (10:31 -0400)
This change routes around this issue, which has been fixed in later lvm2 releases, by passing only one argument to vgcfgbackup by taking all the volume groups that are found and running them through a for loop

handlers/sys.in

index a92663e23766b43c9ed26ecb4e62d21d46effc70..fcf3e31cb8c42f6f5719f653a1809662ae4aa331 100755 (executable)
@@ -649,8 +649,11 @@ function doLvmBackup () {
    debug "$VGS --options vg_name --noheadings | @SED@ 's/^[ ]*//' | @SED@ 's/[ ]*$//' | tr '\n' ' '"
    vgs=`$VGS --options vg_name --noheadings | @SED@ 's/^[ ]*//' | @SED@ 's/[ ]*$//' | tr '\n' ' '`
    debug "Let's try to backup LVM metadata for detected volume groups: $vgs"
-   debug "$VGCFGBACKUP --file \"${lvmdir}\"/\'%s\' $vgs"
-   output=`$VGCFGBACKUP --file "${lvmdir}"/'%s' $vgs`
+   for vg in $vgs
+   do
+      debug "$VGCFGBACKUP --file \"${lvmdir}\"/\'%s\' $vg"
+      output=`$VGCFGBACKUP --file "${lvmdir}"/'%s' $vg`
+   done
    exit_code=$?
    debug $output
    case $exit_code in