[libvirt] [PATCH 0/1] Add shrink flag to blockresize command

martinsson.patrik at gmail.com martinsson.patrik at gmail.com
Sat Oct 5 18:56:20 UTC 2019


From: patchon <martinsson.patrik at gmail.com>

This changes the behaviour when shrinking a block device. This should be
a fairly uncommon thing to do (I think), so I don't think one have to
worry about breaking anything when introducing the new flag (--shrink).

This also mimics the existing behaviour of the vol-resize command, which
I personally think makes sense.

Unfortunately this check was not present when I, one late Friday
afternoon, was asked to extend a production-mysql-slave-device. This
made me accidentally shrink a 2.5TB device with about 150GB. Needless
to say - that Friday afternoon did not end with the obligatory
weekend-beer-celebration.

Non the less, I think this makes sense from an end user perspective.

Also, there is actually one mention of this on behaviour already at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902171

patchon (1):
  Add shrink flag to blockresize command

 src/qemu/qemu_driver.c | 15 ++++++++++++++-
 tools/virsh-domain.c   |  7 +++++++
 tools/virsh.pod        |  9 ++++++++-
 3 files changed, 29 insertions(+), 2 deletions(-)

-- 
2.23.0




More information about the libvir-list mailing list