From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: mlocate/updatedb and btrfs subvolume mounts
Date: Mon, 13 Apr 2015 04:12:41 +0000 (UTC) [thread overview]
Message-ID: <pan$3396c$51a072b0$71501292$8af8c3ee@cox.net> (raw)
In-Reply-To: 20150412201107.GA4711@hungrycats.org
Zygo Blaxell posted on Sun, 12 Apr 2015 16:11:07 -0400 as excerpted:
> Since these are simple binds (not rbinds), they don't see any other
> filesystems, period. They do see btrfs subvolumes, though.
Tho... for systemd users...
Do note that systemd plays with the kernel's shared-subtree "private"
default, switching it to shared for /. The idea is that this makes
containers "just work", since mounts on / get propagated into containers
as well. Unfortunately, the kernel default is private because that's the
way the kernel behaved before the shared-subtree feature was introduced,
and systemd changed that, breaking a lot of assumptions and scripts,
including my backup script, along the way.
I don't use subvolumes, but do use a mount --bind of / elsewhere, so I
can backup /, ALL of / (including subtrees hidden on the primary mount by
overmounts), without any danger of crossing mount-points, since the bind-
mount was always private. I've been doing this since well before I
switched to either btrfs or systemd, and probably since before the kernel
and mount introduced the shared-subtree feature, and it has worked very
well.
But then systemd came around and decided that the "private" default-mount
wasn't good enough for systemd, and that it was now going to default to
shared. Of course that broke existing solutions all over the place, but
as we know, care to keep from breaking existing solutions isn't a
priority, to say the least, with systemd, so...
So I had to add "private" to my / mount options, so mounting the backup
partition on /mnt/bk wouldn't cause it to mount on the already bind-
mounted /mnt/rootbind that I was trying to backup, as well.
Link to a systemd-devel thread describing the change (with a link to the
commit) and the systemd-ish way to undo it using a unit file (as opposed
to the option I added to the fstab / entry instead).
http://lists.freedesktop.org/archives/systemd-devel/2013-
February/008558.html
Also see the mount(8) manpage under shared subtree operations, and the
kernel documentation file in Documentation/filesystems/sharedsubtree.txt.
--
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-04-13 4:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 20:07 mlocate/updatedb and btrfs subvolume mounts G. Richard Bellamy
2015-04-09 18:06 ` G. Richard Bellamy
2015-04-12 20:11 ` Zygo Blaxell
2015-04-13 4:12 ` Duncan [this message]
2015-05-04 23:40 ` G. Richard Bellamy
2015-05-05 2:59 ` Zygo Blaxell
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$3396c$51a072b0$71501292$8af8c3ee@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 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.