Merge "Don't prepend $DATA_DIR to volume path that already has it"

This commit is contained in:
Jenkins 2015-02-17 19:45:30 +00:00 committed by Gerrit Code Review
commit c19a3795de

View File

@ -86,7 +86,7 @@ function _create_lvm_volume_group {
local backing_file=$DATA_DIR/$vg$BACKING_FILE_SUFFIX local backing_file=$DATA_DIR/$vg$BACKING_FILE_SUFFIX
if ! sudo vgs $vg; then if ! sudo vgs $vg; then
# Only create if the file doesn't already exists # 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` local vg_dev=`sudo losetup -f --show $backing_file`
# Only create volume group if it doesn't already exist # Only create volume group if it doesn't already exist