For now, use a more inclusive regex.
$ rbd info foo
rbd image 'foo':
- \tsize 1GiB in 256 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 1 GiB in 256 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
[^^]+ (re)
\tformat: 1 (esc)
$ rbd info foo --format json | python -mjson.tool | sed 's/,$/, /'
</image>
$ rbd info foo@snap
rbd image 'foo':
- \tsize 1GiB in 256 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 1 GiB in 256 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
[^^]+ (re)
\tformat: 1 (esc)
\tprotected: False (esc)
</image>
$ rbd info bar
rbd image 'bar':
- \tsize 1GiB in 256 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 1 GiB in 256 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
\tid:* (glob)
[^^]+ (re)
\tformat: 2 (esc)
</image>
$ rbd info bar@snap
rbd image 'bar':
- \tsize 512MiB in 128 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 512 MiB in 128 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
\tid:* (glob)
[^^]+ (re)
\tformat: 2 (esc)
</image>
$ rbd info bar@snap2
rbd image 'bar':
- \tsize 1GiB in 256 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 1 GiB in 256 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
\tid:* (glob)
[^^]+ (re)
\tformat: 2 (esc)
</image>
$ rbd info baz
rbd image 'baz':
- \tsize 2GiB in 512 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 2 GiB in 512 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
\tid:* (glob)
[^^]+ (re)
\tformat: 2 (esc)
</image>
$ rbd info quux
rbd image 'quux':
- \tsize 1MiB in 1 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 1 MiB in 1 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
[^^]+ (re)
\tformat: 1 (esc)
$ rbd info quux --format json | python -mjson.tool | sed 's/,$/, /'
</image>
$ rbd info rbd_other/child
rbd image 'child':
- \tsize 512MiB in 128 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 512 MiB in 128 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
\tid:* (glob)
[^^]+ (re)
\tformat: 2 (esc)
</image>
$ rbd info rbd_other/child@snap
rbd image 'child':
- \tsize 512MiB in 128 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 512 MiB in 128 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
\tid:* (glob)
[^^]+ (re)
\tformat: 2 (esc)
\tcreate_timestamp:* (glob)
\tprotected: False (esc)
\tparent: rbd/bar@snap (esc)
- \toverlap: 512MiB (esc)
+ \toverlap: 512 MiB (esc)
$ rbd info rbd_other/child@snap --format json | python -mjson.tool | sed 's/,$/, /'
{
"block_name_prefix": "rbd_data.*", (glob)
</image>
$ rbd info rbd_other/deep-flatten-child
rbd image 'deep-flatten-child':
- \tsize 512MiB in 128 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 512 MiB in 128 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
\tid:* (glob)
[^^]+ (re)
\tformat: 2 (esc)
</image>
$ rbd info rbd_other/deep-flatten-child@snap
rbd image 'deep-flatten-child':
- \tsize 512MiB in 128 objects (esc)
- \torder 22 (4MiB objects) (esc)
+ \tsize 512 MiB in 128 objects (esc)
+ \torder 22 (4 MiB objects) (esc)
\tid:* (glob)
[^^]+ (re)
\tformat: 2 (esc)
</images>
$ rbd list -l
NAME SIZE PARENT FMT PROT LOCK
- foo 1GiB 1
- foo@snap 1GiB 1
- quux 1MiB 1 excl
- bar 1GiB 2
- bar@snap 512MiB 2 yes
- bar@snap2 1GiB 2
- baz 2GiB 2 shr
- quuy 2GiB 2
+ foo 1 GiB 1
+ foo@snap 1 GiB 1
+ quux 1 MiB 1 excl
+ bar 1 GiB 2
+ bar@snap 512 MiB 2 yes
+ bar@snap2 1 GiB 2
+ baz 2 GiB 2 shr
+ quuy 2 GiB 2
$ rbd list -l --format json | python -mjson.tool | sed 's/,$/, /'
[
{
</images>
$ rbd list rbd_other -l
NAME SIZE PARENT FMT PROT LOCK
- child 512MiB 2
- child@snap 512MiB rbd/bar@snap 2
- deep-flatten-child 512MiB 2
- deep-flatten-child@snap 512MiB 2
+ child 512 MiB 2
+ child@snap 512 MiB rbd/bar@snap 2
+ deep-flatten-child 512 MiB 2
+ deep-flatten-child@snap 512 MiB 2
$ rbd list rbd_other -l --format json | python -mjson.tool | sed 's/,$/, /'
[
{
</locks>
$ rbd snap list foo
SNAPID NAME SIZE TIMESTAMP
- *snap*1GiB* (glob)
+ *snap*1 GiB* (glob)
$ rbd snap list foo --format json | python -mjson.tool | sed 's/,$/, /'
[
{
</snapshots>
$ rbd snap list bar
SNAPID NAME SIZE TIMESTAMP
- *snap*512MiB* (glob)
- *snap2*1GiB* (glob)
+ *snap*512 MiB* (glob)
+ *snap2*1 GiB* (glob)
$ rbd snap list bar --format json | python -mjson.tool | sed 's/,$/, /'
[
{
<snapshots></snapshots>
$ rbd snap list rbd_other/child
SNAPID NAME SIZE TIMESTAMP
- *snap*512MiB* (glob)
+ *snap*512 MiB* (glob)
$ rbd snap list rbd_other/child --format json | python -mjson.tool | sed 's/,$/, /'
[
{
</snapshots>
$ rbd disk-usage --pool rbd_other 2>/dev/null
NAME PROVISIONED USED
- child@snap 512MiB 0B
- child 512MiB 4MiB
- deep-flatten-child@snap 512MiB 0B
- deep-flatten-child 512MiB 0B
- <TOTAL> 1GiB 4MiB
+ child@snap 512 MiB 0 B
+ child 512 MiB 4 MiB
+ deep-flatten-child@snap 512 MiB 0 B
+ deep-flatten-child 512 MiB 0 B
+ <TOTAL> 1 GiB 4 MiB
$ rbd disk-usage --pool rbd_other --format json | python -mjson.tool | sed 's/,$/, /'
{
"images": [