linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
To: "G. Richard Bellamy" <rbellamy@pteradigm.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: mlocate/updatedb and btrfs subvolume mounts
Date: Sun, 12 Apr 2015 16:11:07 -0400	[thread overview]
Message-ID: <20150412201107.GA4711@hungrycats.org> (raw)
In-Reply-To: <CADw2B2NDTqOXQdh+xBTfk3=MfYJUtGAvQ-B4RaADA4XXJ30OZw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2191 bytes --]

I generally set up that kind of service on bind mounts of its own,
e.g.

        mount --bind / /.binds/root
        mount --bind /boot /.binds/root/boot
        mount --bind /home /.binds/root/home
        ... repeat for everything else you care about

then I tell backup / indexing software to process everything it finds
under /.binds/root.  If it's not possible to have the software drop
the /.binds/root prefix, run it chroot inside /.binds/root instead.
Tell locate to go ahead and process bind mounts since there's nothing
else it will have access to.

Since these are simple binds (not rbinds), they don't see any
other filesystems, period.  They do see btrfs subvolumes, though.

There are plenty of non-btrfs reasons to do things this way.  You can
let users mount SMB shares, FUSE filesystems, or whatever other insane
crap they like, and it won't affect locate or similar services (but make
sure your users have no access to /.binds--chmod it 700, or put them
under an isolated bind mount hierarchy of their own).

On Fri, Apr 03, 2015 at 01:07:37PM -0700, G. Richard Bellamy wrote:
> I've just noticed that I'm having issues with finding files using
> "locate" when those files are on btrfs subvolume mounts.
> 
> The issue is that updatedb cannot discern the difference between a
> btrfs bind mount and btrfs subvolume [1][2]. This generally means that
> if you're using btrfs subvolume mounts and updatedb at the same time,
> and you want to index those subvolumes, you'll need to set
> PRUNE_BIND_MOUNTS to 0 or "no". And then deal with all the cruft that
> causes.
> 
> >From the bug above, you can see that the RedHat dev Michal Sekletar is
> out of ideas. I'm not sure if he's reached out here or not... and if
> not, he might welcome some help from the folks on this list.
> 
> Regrads,
> Richard
> 
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=906591#c3
> [2] http://www.spinics.net/lists/linux-btrfs/msg42510.html
> --
> 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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2015-04-12 20:20 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 [this message]
2015-04-13  4:12   ` Duncan
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=20150412201107.GA4711@hungrycats.org \
    --to=ce3g8jdj@umail.furryterror.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rbellamy@pteradigm.com \
    /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).