From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Fix no space bug caused by removing bg
Date: Wed, 23 Sep 2015 04:49:37 +0000 (UTC) [thread overview]
Message-ID: <pan$39d79$476d5a75$50a7f466$256bcde5@cox.net> (raw)
In-Reply-To: 560190CA.7060606@gmail.com
Austin S Hemmelgarn posted on Tue, 22 Sep 2015 13:32:58 -0400 as
excerpted:
>> Of course, you shouldn't be nesting subvolumes anyway. It makes
>> it much harder to manage them.
>
> That depends though, I only ever do single nesting (ie, a subvolume in a
> subvolume), and I use it to exclude stuff from getting saved in
> snapshots
Good point.
Such snapshot-exclusion-via-subvolume-boundary is a frequently
recommended use-case for nocow files, of course, to keep them from
fragmenting due to snapshot-provoked cow1.
If there's no (other) reason to mount the subvolumes separately, either
because they're primarily snapshot-exclusion subvolumes or for whatever
other reason they aren't intended to be specifically mounted, but
instead, simply used as ordinary subdirs for most purposes, then nesting
really /does/ make sense, because relying on the normal subdir behavior,
that does avoid the otherwise necessary separate mount.
Which, meanwhile, brings up a particular bone I have to pick with
systemd's use of btrfs subvolumes in various cases, particularly in
tmpfiles.d usage, as well. Since IIRC systemd 219, various previously
created directories, including the (virtual-) machines tree, are by
default subvolume-creations, now, of course only if they don't already
exist.
These subvolumes are explicitly nested at whatever location they happen
to appear in the subtree, as tmpfiles.d simply creates them as subvolumes,
with a fallback to the standard subdirs they were created as in earlier
versions on filesystems other than btrfs. Other than the standard mount
processing, which involves admins specifically setting up the appropriate
subvolumes and mounts for them ahead of time, there's no provision made
for creating them in a standard subvolume location at root level, and
mounting them at whatever tree location their final destination is, as is
standard recommended practice for btrfs "upstream".
Tho personally, I just prefer that they stay as subdirs, since I don't
have any particular need to and therefore don't want to complicate my
btrfs use-case with subvolumes, when I already break my tree up into
multiple independent btrfs /filesystems/ using standard partitioning,
etc, specifically in ordered to avoid having so many data eggs in one
filesystem basket, and thus avoid the risk of losing them all should the
bottom of that single basket fall out with the filesystem going bad on
me. I know from hard learned experience with much-too-big-mdraid arrays
how painful maintenance operations can be when they take hours or days,
compared to the seconds (due to ssd) or minutes (were they on spinning
rust) maintenance such as balance or scrub now takes me on each of my all
well under hundred-gig separate btrfs, with the difference even more
pronounced since most of the time there's only one or two filesystems I
need to do maintenance on, instead of the whole tree.
So I use multiple small independent btrfs, and don't want or need
subvolumes, which would only complicate my use-case. Fortunately, I can
avoid systemd creating those subvolumes even tho I'm on btrfs, the normal
target for them, by simply already having the subdirs created... as
subdirs. Tho the initial 219 implementation bugged out on them
(subvolume-create error because my root filesystem is deliberately left
read-only by default, which propagated thru to a tmpfiles.d service
failure), I filed a bug, and by 221 (IIRC) tmpfiles.d was working
correctly, leaving my existing subdirs alone.
Unfortunately, now I have to worry about manual subdir creation to avoid
the automated subvolume creation on a new install, or should I forget,
worry about discovering and undoing the automated subvolume create.
Oh, well...
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2015-09-23 4:49 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 12:59 [PATCH] btrfs: Fix no space bug caused by removing bg Zhao Lei
2015-09-21 13:27 ` Filipe David Manana
2015-09-21 13:37 ` Filipe David Manana
2015-09-22 10:06 ` Zhao Lei
2015-09-22 10:22 ` Filipe David Manana
2015-09-22 11:24 ` Zhao Lei
2015-09-22 12:45 ` Filipe David Manana
2015-09-23 1:59 ` Zhao Lei
2015-09-22 10:22 ` Zhao Lei
2015-09-22 12:59 ` Jeff Mahoney
2015-09-22 13:28 ` Hugo Mills
2015-09-22 13:36 ` Holger Hoffstätte
2015-09-22 13:41 ` Hugo Mills
2015-09-22 14:23 ` David Sterba
2015-09-22 14:36 ` Hugo Mills
2015-09-22 14:54 ` Austin S Hemmelgarn
2015-09-22 15:39 ` Hugo Mills
2015-09-22 17:32 ` Austin S Hemmelgarn
2015-09-22 17:37 ` Austin S Hemmelgarn
2015-09-23 4:49 ` Duncan [this message]
2015-09-23 13:28 ` David Sterba
2015-09-23 13:57 ` Austin S Hemmelgarn
2015-09-23 14:05 ` Hugo Mills
2015-09-23 13:12 ` David Sterba
2015-09-23 13:19 ` Qu Wenruo
2015-09-23 13:32 ` Austin S Hemmelgarn
2015-09-23 14:00 ` Qu Wenruo
2015-09-23 17:28 ` David Sterba
2015-09-23 13:37 ` David Sterba
2015-09-23 13:45 ` Hugo Mills
2015-09-23 13:28 ` Hugo Mills
2015-09-22 16:23 ` Jeff Mahoney
2015-09-23 2:14 ` Zhao Lei
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='pan$39d79$476d5a75$50a7f466$256bcde5@cox.net' \
--to=1i5t5.duncan@cox.net \
--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).