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
This commit is contained in:
parent
61112a74f7
commit
979c876378
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user