linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs multiple mounts stacked on the same mount point
Date: Wed, 12 Feb 2014 13:17:34 +0000 (UTC)	[thread overview]
Message-ID: <pan$2e9dc$83411375$89da7090$541a6478@cox.net> (raw)
In-Reply-To: 52FB2490.1030207@oracle.com

Anand Jain posted on Wed, 12 Feb 2014 15:36:48 +0800 as excerpted:

>> BTW, another (general) reason over-mounts are sometimes used is to
>> deliberately obscure what's underneath.  It's worth noting that
>> anything with a file already open on the underlying filesystem still
>> has access to that file after something else is mounted over top, and
>> that fact is sometimes used to control access to certain
>> files/filesystems, by starting whatever it is that needs to access them
>> and letting them open the files they need, then over-mounting a
>> different filesystem, often empty, so no other applications can access
>> the under-mounted files.
> 
>   Thanks. Makes sense theoretically. Any eg of real practical
> application ? Any product in the market using it that way ?

At least from here over-mount-to-prevent-access seems more like an admin 
technique than something someone would ship in a product.  And yes, while 
I don't know of any specific product using the technique, I've certainly 
read of admins using the trick -- that's actually how I knew about it 
myself.

>   looks btrfs-progs shouldn't depend on the mnt-point driven ioctls to
>   manage the FS. Now that's a set of challenges.

I don't really see why not.  Why would one /need/ to issue ioctls to an 
under-mounted filesystem that's not otherwise accessible (except to apps 
with files on it opened before a different filesystem was over-mounted on 
top), and why wouldn't the ordinary rules of umounting the over-mount in 
ordered to access it if necessary, not apply?  In general, I think most 
admins are used to the general limitation, and I doubt it would even 
occur to most of them to try to (for example) run a balance or check the 
free space on a filesystem they can't otherwise access, because that sort 
of thing is in most cases simply not possible.

And if for some reason one were to need such an arrangement, that's what 
bind/move/shared-mounts are for.  (See the mount (8) manpage and $KERNDIR/
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


      reply	other threads:[~2014-02-12 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11  8:18 btrfs multiple mounts stacked on the same mount point Anand Jain
2014-02-11 20:57 ` Duncan
2014-02-12  3:37   ` Anand Jain
2014-02-12  5:15     ` Duncan
2014-02-12  7:36       ` Anand Jain
2014-02-12 13:17         ` Duncan [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='pan$2e9dc$83411375$89da7090$541a6478@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).