Description of problem:
With BZ 1545049, we accept block sizes specified only as KiB, MiB, GiB and the like.. plus anything specified as 1G would get defaulted to 1GiB and would succeed. Anything specified as 1MB/1GB and the like, will fail with an error. This bugzilla is to improve the error message displayed, mentioning the 'why' a seemingly logical and widely used unit like 1MB/1GB is termed as an incorrect size, along with nudging/educating the user the accepted unit of size in 'gluster-block create' command.
With talks of considering to support gluster-block with stand-alone RHGS, all the more reason to have a good usability of block storage functionality.
'man gluster-block' does talk about the accepted size units in create command, but nowhere else the same information pops up - neither 'gluster-block create help' nor 'gluster-block create' command specified with size incorrectly.
Version-Release number of selected component (if applicable):
[root@dhcp47-50 ~]# gluster-block create ozone/ob8 ha 1 prealloc full 10.70.47.55 1KB
'<size>' is incorrect
gluster-block create <volname/blockname> [ha <count>] [auth <enable|disable>] [prealloc <full|no>] [storage <filename>] [ring-buffer <size-in-MB-units>] <HOST1[,HOST2,...]> <size> [--json*]
Not a focus in the product, and we would take it up UPSTREAM.