From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Calvin Walton <calvin.walton@kepstin.ca>,
OmegaPhil <OmegaPhil@startmail.com>,
Duncan <1i5t5.duncan@cox.net>,
linux-btrfs@vger.kernel.org, Hugo Mills <hugo@carfax.org.uk>
Subject: Re: Unable to allocate for space usage in particular btrfs volume
Date: Fri, 6 Nov 2015 15:35:56 -0500 [thread overview]
Message-ID: <563D0F2C.3080400@gmail.com> (raw)
In-Reply-To: <1446840956.3899.13.camel@kepstin.ca>
[-- Attachment #1: Type: text/plain, Size: 2591 bytes --]
On 2015-11-06 15:15, Calvin Walton wrote:
> On Thu, 2015-11-05 at 10:44 +0000, OmegaPhil wrote:
>> On 05/11/15 04:18, Duncan wrote:
>>> OmegaPhil posted on Wed, 04 Nov 2015 21:53:09 +0000 as excerpted:
>>> VM image files (and large database files, for the same reason) are
>>> a bit
>>> of a problem on btrfs, and indeed, any COW-based filesystem, since
>>> the
>>> random rewrite pattern matching that use-case is pretty much the
>>> absolute
>>> worst-case match for a COW-based filesystem there is.
>>> Since you're not doing snapshotting (which conflicts with this
>>> option,
>>> with an imperfect workaround), setting nocow on those files may
>>> well
>>> eliminate the problem, but be aware if you aren't already that (1)
>>> nocow
>>> does turn off checksumming as well, in ordered to avoid a race that
>>> could
>>> easily lead to data corruption, and (2) you can't just activate
>
>> So a couple of gig still unaccountable but irrelevant. Thanks,
>> problem
>> solved! Although hopefully checksumming will be allowed on nocow
>> files
>> in the future as thats currently 17% of all data unprotected and will
>> get worse...
>
> There's actually an interesting workaround to this: Although the VM
> disk images aren't checksummed on the host filesystem, you can use
> btrfs *inside* the VMs and enable checksumming there. The downside is
> that you can only verify the VM data by booting the VM and running a
> scrub from inside.
Actually, by using a combination of loop devices and kpartx, it's fully
possible to mount the FS and verify it without booting the VM. Of
course, doing this usually requires root access on the host system, but
for most people I know, that's usually not an issue. I do this on
occasion when I need to pull a file off of one of my VM disks on my
laptop and don't have the time to spin up the VM itself.
Another option if you're doing a direct boot of the kernel (for example,
when using a fully paravirtualized domain on Xen, or using some of the
QEMU ARM systems) is to just do the volume management (partitioning and
such) on the host, and expose each filesystem to the guest as a separate
disk. I do this with most of my Linux VM's on my Xen system where I use
LVM as the back-end storage for the virtual disk images, as it allows me
to easily directly mount the VM's filesystems on the host if need be
(and let's you do all kinds of cool things like using a cluster-aware
filesystem for the VM's root so that you can mount it from the host
safely while the VM is still online).
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]
prev parent reply other threads:[~2015-11-06 20:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 21:10 Unable to allocate for space usage in particular btrfs volume OmegaPhil
2015-11-04 21:30 ` Hugo Mills
2015-11-04 21:53 ` OmegaPhil
2015-11-05 4:18 ` Duncan
2015-11-05 10:44 ` OmegaPhil
2015-11-05 11:49 ` Hugo Mills
2015-11-06 20:15 ` Calvin Walton
2015-11-06 20:35 ` Austin S Hemmelgarn [this message]
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=563D0F2C.3080400@gmail.com \
--to=ahferroin7@gmail.com \
--cc=1i5t5.duncan@cox.net \
--cc=OmegaPhil@startmail.com \
--cc=calvin.walton@kepstin.ca \
--cc=hugo@carfax.org.uk \
--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 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).