Commit 23e3e6b1 authored by Mike Hibler's avatar Mike Hibler

Merge branch 'patch-4' into 'master'

Many LV segments fail on "dmsetup remove" because they are still mounted. Need…

See merge request !28
parents 1eddd90b e8c79ac5
......@@ -5199,6 +5199,11 @@ sub lvmDestroyVolume($$)
$dmname =~ s#/#-#;
foreach my $part (1..4) {
my $dev = "${dmname}p$part";
if (-e "/dev/mapper/$dev") {
# Many cases the partition needs to be unmounted before it can be
# removed
mysystem2("umount /dev/mapper/$dev");
}
if (-e "/dev/mapper/$dev" && !mysystem2("dmsetup remove $dev")) {
print STDERR "WARNING: removed leftover partdev '$dev'\n";
$tryagain = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment