incorrect space calculation on disk removal #1553

phillxnet opened this Issue Nov 29, 2016 · 1 comment


None yet

1 participant

phillxnet commented Nov 29, 2016 edited

When removing a disk from a pool the calculation to disqualify the action is based on if the disk being removed is larger than the overall pool usage. Where as the action should only be disqualified if the disk being removed is larger than the pool free space: as the error message state:

To reproduce I added a 7.5 GB disk to a nearly empty (1GB used) 473 GB pool.
I was then unable to remove this 7.5 GB as it's size was > than the use space of the pool ( about 1GB), rather than the space free (pool size - usage).

Removing these([u'mmc-00000_0x1ceff260']) disks may shrink the pool by 7864320KB, which is greater than available free space 1081856KB. This is not supported.

Having a quick look at this now.

@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Nov 29, 2016
@phillxnet phillxnet correct disk removal disqualification calculation #1553
Previously we refused a disk removal based on disk > pool usage
but the intended calculation was disk > pool free space.
Hence switch usage for (pool.size - usage) = free space.
@schakrava schakrava closed this in #1554 Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment