stratis-storage/stratis-cli

We should probably check blockdevs on create_pool as we do for add_blockdevs

Closed this issue · 1 comments

This will bring the create pool action more into alignment with the add_blockdevs action.

Additionally, we realized that there were two distinctions that we weren't making quite properly for add_blockdevs:

  • In _check_opposite_tier we always return an InUse error if the blockdev is in use, which is correct. But that InUse error should contain information about what pool is using the device and it doesn't, which is potentially confusing for the user.

  • In _check_same_tier we always return PartialChange. This is only correct if the device is in use in the same pool. If it is in use in a different pool, we should return InUse error instead.

In both cases, we still refuse to perform the action and show an error, correctly. The proposed change would improve the error messages that the user sees.