16 Oct
2018
16 Oct
'18
2 p.m.
On Tue, Oct 16, 2018 at 9:28 AM Richard W.M. Jones <rjones@redhat.com> wrote:
We would like to create and write to a large sparse file but would like to keep the file on disk itself in compact format. So we are not talking about a file system but a single file. I guess this means creating qcow2 disk and attach as a local device?
I'm still a little unclear, but most likely:
qemu-nbd -c /dev/nbd0 file.qcow2 qemu-nbd -d /dev/nbd0
The first command will attach file.qcow2 to /dev/nbd0, making it appear as a normal host device. The second will detach it.
Thanks. I will try it.