diff --git a/virt-backup b/virt-backup index aee1ecf..5c74325 100644 --- a/virt-backup +++ b/virt-backup @@ -336,17 +336,25 @@ sub prepare_backup{ elsif ($disk->{type} eq 'file'){ # Try to find the mount point, and the backing device my @df = `df -PT $source`; - my ($dev,$type,undef,undef,undef,undef,$mount) = split /\s+/, $df[1]; + 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, wee need to detect Volume Group # name and Logical Volume name - my (undef,$lv,$vg) = split (/\s+/, `/sbin/lvs --noheadings -o lv_name,vg_name $dev $backupdir.meta/mount";