From f641d7b636d429229bb9376450df9dd94de27340 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 18 Jan 2019 09:45:03 +0100 Subject: [PATCH] Don't try to detect backing LVM volume is snapshot is disabled --- virt-backup | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/virt-backup b/virt-backup index 4e70fb7..f2311e7 100644 --- a/virt-backup +++ b/virt-backup @@ -410,33 +410,33 @@ sub prepare_backup{ } # If the disk is a file elsif ($disk->{type} eq 'file'){ - # Try to find the mount point, and the backing device - my @df = `df -PT $source`; - my ($dev, undef, undef, undef, undef, undef, $mount) = split /\s+/, $df[1]; - # Ok, we now have the backing device which probably looks like /dev/mapper/vg-lv - # We cannot pass this arg to lvcreate to take a snapshot, we need to detect Volume Group - # name and Logical Volume name - my $lvm = ''; - if ($opts{lvm} eq '' and $dev =~ m!^/dev/!){ - my (undef, $lv, $vg) = split (/\s+/, `$opts{lvs} --noheadings -o lv_name,vg_name $dev