ceph/ceph — pull request #209 by wido (2013-04-09 09:16:22+00:00)
Title: rbd: Only allow shrinking an image when --allow-shrink flag is passed

When resizing you can currently destroy an image (happened to me...), so I wrote a patch for the "rbd" tool which only allows shrinking with the "--allow-shrink" flag.

wido@wido-desktop:~$ rbd create wido --size 2048
wido@wido-desktop:~$ rbd resize wido --size 1024
rbd: shrinking an image is only allowed with the --allow-shrink flag
wido@wido-desktop:~$ rbd resize wido --size 1024 --allow-shrink
Resizing image: 100% complete...done.
wido@wido-desktop:~$