From 9f89903d884703d4b25cb11b3ad0de901c7d290d Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 19 Sep 2013 13:12:13 +0200 Subject: [PATCH] Correctly detect the filesystem type and fix issue detecting the backing volume when GlusterFS is used --- virt-backup | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) 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";