All of lore.kernel.org
 help / color / mirror / Atom feed
From: Justin Ossevoort <justin@internetionals.nl>
To: linux-btrfs@vger.kernel.org
Subject: Re: VM nocow, should VM software set +C by default?
Date: Tue, 25 Feb 2014 10:16:21 +0100	[thread overview]
Message-ID: <530C5F65.6020607@internetionals.nl> (raw)
In-Reply-To: <A2EE3F12-97D9-46CD-8360-ACCFF71F149B@colorremedies.com>

I think in principle: No.

It is something that should be documented as advise in the VM software 
documentation. But things like storage management is the domain of the 
distribution or systems administrator.

There might be a situation where the VM software can directly use a 
btrfs filesystem for it's storage engines where it could be sensible to 
add such a thing, but in that case it's already directly managing it's 
subvolumes and can turn nodatacow on/off when appropriate.
In that case it would probably also be using some of it's higher level 
functions for snapshotting, acls and possibly metadata (and not as a 
dumb container for disk images).

So if the VM software would be controlling the filesystem directly, than 
it could be useful but would probably be better achieved using different 
options.
If the VM software is merely using it to store image files, than it 
would be up to the distribution/systems administrator to set a '+C' on 
the directory where the images will be stored (that flag were being 
inherited iirc).
A distribution could easily try marking the default images directory 
with '+C' on installation for "Joe Average" user (when he decides to do 
things differently, than that's his conscious choice). But it could also 
decide that a better default would be to use a entirely different 
subvolume for VM images, with another raid level and no compression but 
with CoW enabled by default (and thus relying on autodefrag to work).

It should simply be a matter of: Who manages the storage decides how it 
should be configured and whether not to do CoW is an aspect of 
configuration.

Regards,

	justin....

On 21-02-14 17:55, Chris Murphy wrote:
> Use case is a user who doesn't know that today xattr +C ought to be set on vm images when on Btrfs. They use e.g. Gnome Boxes, or Virtual Machine Manager (virt-manager) to configure pools, images, and VMs.
>
> If libvirt were to set +C on any containing directory configured as a pool, then any copied as well as newly created images would inherit +C. So is this the long term recommended practice, and should various VM projects be asked to build this functionality? Or will there be optimizations, such as autodefrag, that will obviate the need for +C on such VM images in the somewhat near future?
>
>
> Chris Murphy--
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  parent reply	other threads:[~2014-02-25  9:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 16:55 VM nocow, should VM software set +C by default? Chris Murphy
2014-02-21 17:56 ` Duncan
2014-02-25  9:16 ` Justin Ossevoort [this message]
2014-02-25 17:44   ` Chris Murphy
2014-02-25 17:53     ` Jim Salter
2014-02-25 18:33       ` Chris Murphy
2014-02-26  5:43         ` Duncan
2014-02-25 18:01     ` Roman Mamedov

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=530C5F65.6020607@internetionals.nl \
    --to=justin@internetionals.nl \
    --cc=linux-btrfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.