New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect space calculation on disk removal #1553

Closed
phillxnet opened this Issue Nov 29, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@phillxnet
Member

phillxnet commented Nov 29, 2016

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.
@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Nov 29, 2016

Member

Having a quick look at this now.

Member

phillxnet commented Nov 29, 2016

Having a quick look at this now.

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Nov 29, 2016

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

schakrava added a commit that referenced this issue Nov 30, 2016

Merge pull request #1554 from phillxnet/1553_incorrect_space_calculat…
…ion_on_disk_removal

correct disk removal disqualification calculation. Fixes #1553
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment