From: "Daniel P. Berrange" <berrange@redhat.com>
To: 吴兴博 <wuxb45@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] disk image: self-organized format or raw file
Date: Tue, 12 Aug 2014 19:46:30 +0100 [thread overview]
Message-ID: <20140812184630.GP8471@redhat.com> (raw)
In-Reply-To: <CABPa+v3e1ZGyD9higvQmk6H-3A8YWohG-AhQY0bcCPJtjbtAtg@mail.gmail.com>
On Mon, Aug 11, 2014 at 07:38:50PM -0400, 吴兴博 wrote:
> Hello,
>
> The introduction in the wiki page present several advantages of qcow2
> [1]. But I'm a little confused. I really appreciate if any one can give me
> some help on this :).
>
> (1) Currently the raw format doesn't support COW. In other words, a raw
> image cannot have a backing file. COW depends on the mapping table on which
> we it knows whether each block/cluster is present (has been modified) in
> the current image file. Modern file-systems like xfs/ext4/etc. provide
> extent/block allocation information to user-level. Like what 'filefrag'
> does with ioctl 'FIBMAP' and 'FIEMAP'. I guess the raw file driver (maybe
> block/raw-posix.c) may obtain correct 'present information about blocks.
> However this information may be limited to be aligned with file allocation
> unit size. Maybe it's just because a raw file has no space to store the
> "backing file name"? I don't think this could hinder the useful feature.
>
> (2) As most popular filesystems support delay-allocation/on-demand
> allocation/holes, whatever, a raw image is also thin provisioned as other
> formats. It doesn't consume much disk space by storing useless zeros.
> However, I don't know if there is any concern on whether fragmented extents
> would become a burden of the host filesystem.
>
> (3) For compression and encryption, I'm not an export on these topics at
> all but I think these features may not be vital to a image format as both
> guest/host's filesystem can also provide similar functionality.
>
> (4) I don't have too much understanding on how snapshot works but I think
> theoretically it would be using the techniques no more than that used in
> COW and backing file.
>
> After all these thoughts, I still found no reason to not using a 'raw' file
> image (engineering efforts in Qemu should not count as we don't ask for
> more features from outside world).
> I would be very sorry if my ignorance wasted your time.
FWIW, much of what you say about features supported in filesystems is
correct, however, that is only considering the needs of deployment on
your specific platform. One value of QCow2 is that it is a portable
format you can use on any platform where QEMU builds, whether it be
Linux, Windows, *BSD or Solaris. If you were to rely on the host
filesystem then obviously you'd have to figure out the different
solution for the particular OS you deploy on.
Taking the compression feature - arguably the biggest benefit of that
is when you distribute disk images. eg if someone provides a root disk
image on a web server, using compression in qcow2 can dramatically
lower the download size, while still allowing QEMU to directly run
from that qcow2 file. Sure you could wrap your disk images in gzip
and then convert to your local filesystem at time of use but this
introduces multiple extra steps.
There's similar arguments for other features in qcow2. That's not to
say you are wrong in your analysis of your own needs. It is simply a
case that different scenarios imply different solutions, so for some
qcow2 may be optimal, while for others using native filesystem features
might be better
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
next prev parent reply other threads:[~2014-08-12 18:46 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 23:38 [Qemu-devel] disk image: self-organized format or raw file 吴兴博
2014-08-12 0:52 ` Fam Zheng
2014-08-12 10:46 ` 吴兴博
2014-08-12 11:19 ` Fam Zheng
[not found] ` <CABPa+v1a7meoEtjLkwygjuZEABTqd8q3efGWJvAsAr-mLTQb-A@mail.gmail.com>
[not found] ` <20140812113916.GB2803@T430.redhat.com>
2014-08-12 12:03 ` 吴兴博
2014-08-12 12:21 ` Fam Zheng
2014-08-12 13:08 ` Kirill Batuzov
2014-08-12 13:23 ` Eric Blake
2014-08-12 13:45 ` 吴兴博
2014-08-12 14:07 ` Eric Blake
2014-08-12 14:14 ` 吴兴博
2014-08-12 15:30 ` Eric Blake
2014-08-12 16:22 ` Xingbo Wu
2014-08-13 1:29 ` Fam Zheng
2014-08-13 15:42 ` Kevin Wolf
2014-08-12 18:39 ` Richard W.M. Jones
2014-08-12 18:46 ` Daniel P. Berrange [this message]
2014-08-12 18:52 ` Richard W.M. Jones
2014-08-12 19:23 ` Xingbo Wu
2014-08-12 20:14 ` Richard W.M. Jones
2014-08-13 15:54 ` Kevin Wolf
2014-08-13 16:38 ` Xingbo Wu
2014-08-13 18:32 ` Kevin Wolf
2014-08-13 21:04 ` Xingbo Wu
2014-08-13 21:35 ` Eric Blake
2014-08-14 2:42 ` Xingbo Wu
2014-08-14 9:06 ` Kevin Wolf
2014-08-14 20:53 ` Xingbo Wu
2014-08-15 10:46 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140812184630.GP8471@redhat.com \
--to=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wuxb45@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).