On 01/12/2017 04:22 AM, Bob Chen wrote: > Hi, > > > My qemu runs on a 3rd party distributed block storage, and the disk backend > protocol is nbd. > > I notices that there are differences between default qcow2 local disk and > my nbd disk, in terms of resizing the disk on the fly. > > Local qcow2 disk could work no matter using qemu-img resize No. Don't EVER use 'qemu-img resize' while a qemu process is actively serving a VM guest. Two concurrent modifiers to a qcow2 file is unsupported, and is highly likely to corrupt your guest's view of the disk, if not the entire qcow2 file. > or qemu monitor > 'block_resize', Yes, that is the only supported way to do an online resize. > but the nbd disk seemed to fail to detect the backend size > change(had resized the disk on EBS at first). It said "this feature or > command is not currently supported". That's because the NBD protocol lacks a resize command. You'd have to first get that proposed as an NBD extension before qemu could support it. > > Is that possible to hack qemu nbd code, making it the same way as resizing > local qcow2 disk? I have the interface to resize EBS disk at backend. Anything is possible in open source with enough time and patches, but the place to tackle this is to first propose an extension to the NBD protocol (I've added the NBD list in cc). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature