From 4c20607e0a867fcd877466e1eccab305ff62a03a Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Mon, 16 Feb 2015 21:56:29 +0000 Subject: [PATCH] Don't prepend $DATA_DIR to volume path that already has it Otherwise the test is testing the wrong file. Change-Id: Ia7dcda8d4f3a1fe87e74f4605a7010b66c38fa14 --- lib/lvm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lvm b/lib/lvm index ed24487c5f..c183f09d04 100644 --- a/lib/lvm +++ b/lib/lvm @@ -86,7 +86,7 @@ function _create_lvm_volume_group { local backing_file=$DATA_DIR/$vg$BACKING_FILE_SUFFIX if ! sudo vgs $vg; then # Only create if the file doesn't already exists - [[ -f $DATA_DIR/$backing_file ]] || truncate -s $size $backing_file + [[ -f $backing_file ]] || truncate -s $size $backing_file local vg_dev=`sudo losetup -f --show $backing_file` # Only create volume group if it doesn't already exist