[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#757818: partman-lvm: Refuses to reinstall if it find old lvm volume



Control: tag 757818 + patch

[Gabriele Giacone]
> Same problem with xen-tools and fai-setup-storage (CC'ing bugs).

Thank you for the hint.  I tried modifying the lvm-base.sh code and
reinstall a Main Server using Debian Edu Jessie, and got the
reinstallation working again.

I first tried with 

  log-output -t partman-lvm lvcreate --wipesignatures y -l "$extents" \
    -n "$lv" $vg

but this did not work as I had hoped.  Next, I tried using --yes instead
of '--wipesignatures y', and this worked as intended.  Thus I propose
this patch for partman-lvm to make sure one can reinstall machines using
LVM:

diff --git a/lib/lvm-base.sh b/lib/lvm-base.sh
index 4e83d67..1ea69e3 100644
--- a/lib/lvm-base.sh
+++ b/lib/lvm-base.sh
@@ -477,7 +477,7 @@ lv_create() {
        lv="$2"
        extents="$3"
 
-       log-output -t partman-lvm lvcreate -l "$extents" -n "$lv" $vg
+       log-output -t partman-lvm lvcreate --yes -l "$extents" -n "$lv" $vg
        return $?
 }
 

Will it have any unexpected side effects, or should I upload a fixed
package right away?

-- 
Happy hacking
Petter Reinholdtsen


Reply to: