qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?


From: Richard W.M. Jones
Subject: Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?
Date: Mon, 11 Jun 2018 09:44:23 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jun 06, 2018 at 01:32:47PM +0200, Max Reitz wrote:
> ext2?

I wrote an nbdkit plugin for ext2/ext3/ext4 last week.

  https://github.com/libguestfs/nbdkit/tree/master/plugins/ext2

It uses libext2fs from e2fsprogs and I think there are some lessons
for anyone who wants to use ext2 to store disk images.

(1) You cannot have more than one host process accessing a single
filesystem image, even read-only.  This is because opening an ext2+
filesystem even read-only causes writes, replaying the journal (for
ext3+) or writing to the superblock.

I'm sure there are some common use-cases such as overlays sharing a
common backing store which are excluded by this restriction.

(2) Within a single process you cannot have more than one libext2fs
handle open on the filesystem image.  This could make qemu block
drivers a bit awkward (although not impossible) because if two
instances of an ext2 qemu block driver both opened different disks in
the same filesystem they'd need to share a handle.

(3) You can resize files in the filesystem, although because we're
waiting for the NBD resize extension to be finalized my plugin does
not do that.

(4) Trim/discard appears to be possible (and it should be possible to
punch holes in the filesystem image) but I couldn't actually
understand how to make it work.  Also fast zeroing.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]