From 979c876378d30e0bba78de370b2b0dbd967149cf Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Thu, 20 Aug 2015 15:37:05 +0100 Subject: [PATCH] Remove read only disks from lvm candidates This patch removes read only disks from the candidates to be used to store the lxc and cinder lvm volume groups. Change-Id: I8fc0842f3629ac3c9fd01b01ecf37ffc68e3b871 Closes-Bug: #1487055 --- scripts/scripts-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/scripts-library.sh b/scripts/scripts-library.sh index 44ec32a90d..db282f1507 100755 --- a/scripts/scripts-library.sh +++ b/scripts/scripts-library.sh @@ -69,7 +69,7 @@ function configure_diskspace() { # only do this if the lxc vg doesn't already exist if ! vgs lxc > /dev/null 2>&1; then - blk_devices=$(lsblk -nrdo NAME,TYPE | awk '/d[b-z]+ disk/ {print $1}') + blk_devices=$(lsblk -nrdo NAME,TYPE,RO | awk '/d[b-z]+ disk [^1]/ {print $1}') for blk_dev in ${blk_devices}; do # dismount any mount points on the device mount_points=$(awk "/^\/dev\/${blk_dev}[0-9]* / {print \$2}" /proc/mounts)