Skip to content

Commit

Permalink
check number of PVs in VG, don't offer reduce if there is only one PV
Browse files Browse the repository at this point in the history
Bug-Url: kerubistan#242
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
  • Loading branch information
K0zka committed Dec 27, 2018
1 parent a6582b8 commit e8f8c0e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object RemoveDiskFromVGFactory : AbstractOperationalStepFactory<RemoveDiskFromVG
.mapNotNull { capability ->
val capFree =
host.dynamic.storageStatusById[capability.id]?.freeCapacity ?: BigInteger.ZERO
if (device in capability.storageDevices && capFree > blockDevice.storageCapacity) {
if (capability.storageDevices.size > 1 && device in capability.storageDevices && capFree > blockDevice.storageCapacity) {
RemoveDiskFromVG(device = device, capability = capability, host = host.stat)
} else null
}
Expand Down

0 comments on commit e8f8c0e

Please sign in to comment.