[virt-tools-list] Delayed Deletion or Creation

Richard W.M. Jones rjones at redhat.com
Wed Jan 27 17:48:41 UTC 2016


On Mon, Jan 25, 2016 at 11:10:16AM -0500, Cole Robinson wrote:
> On 01/24/2016 08:15 AM, Michael A Cooper wrote:
> > Hey Guys,
> > 
> >         How is everyone? I am not sure how to word this question but here
> > goes. I have a 3 server setup and I created a nfs share so that I could do
> > Live Migration across the servers. So when I create the vm with qcow2
> > everything goes smooth and quick, but when I try to create with .img (Raw) it
> > takes forever to create the file. Also when I try and delete an .img file (20
> > gb) it has been over 20 minutes to delete it, any ideas?
> > 
> 
> qcow2 files are sparse/not-fully-allocated, so while you request 20GB it's
> probably only writing a few MB. The rest is filled in as the VM writes to it.
> 
> raw can do sparse as well, but 1) virt-manager doesn't default to it if you
> choose raw which means it is allocating the full 20GB, and 2) even if you do
> choose sparse the semantics are a bit different for NFS, not sure if it
> affects your use case though:
> https://serverfault.com/questions/731632/does-nfs-and-smb-support-sparse-files

I suspect in this case, the shortcoming of NFS is that it doesn't
support posix_fallocate, so it has to be emulated by glibc (although
NFS 4.2 does support it, finally).

This bug is also relevant if you're using RHEL 7.2:

  https://bugzilla.redhat.com/show_bug.cgi?id=1265196

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the virt-tools-list mailing list