[Libguestfs] Fwd: is there a way to set discard=unmap when using guestmount? (#52)

Richard W.M. Jones rjones at redhat.com
Thu Sep 3 09:48:20 UTC 2020


----- Forwarded message from braindevices <notifications at github.com> -----

Subject: [libguestfs/libguestfs] is there a way to set discard=unmap when using
	guestmount? (#52)

I cannot find anything in the document. This option is very important for dynamic qcow2 disks. Without out this the IO is super slow even on tmpfs only 3MB/s.


Subject: Re: [libguestfs/libguestfs] is there a way to set discard=unmap when
	using guestmount? (#52)

Not using guestmount, but it's possible to do it using the API directly and therefore from guestfish, something like this:
```
guestfish <<EOF
add disk.img discard:unmap
run
mount /dev/sda /
mount-local /tmp/mp
mount-local-run
EOF
```
See also: https://rwmj.wordpress.com/2012/03/29/libguestfs-mount-local/

----- End forwarded message -----

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list