Skip to content

plocate does not index $HOME on Btrfs subvolume setups unless PRUNE_BIND_MOUNTS="no" #3744

@rewisch

Description

@rewisch

System details

Omarchy 3.2

What's wrong?

On Btrfs systems locate (plocate) fails to index anything in $HOME. Running updatedb completes without errors, but locate returns no results for files inside the user’s home directory.

The cause is that Arch (and Omarchy, inheriting from Arch) ships:

PRUNE_BIND_MOUNTS="yes"

in /etc/updatedb.conf

Btrfs subvolumes appear as bind mounts, so updatedb prunes them even though they are real subvolumes.

Setting it to:

PRUNE_BIND_MOUNTS="no"

immediately fixes the issue. This might be a bit crude and I'm not sure whether it might have unintended side-effects for some users.

Another solution might be to create a different db for home (see https://discussion.fedoraproject.org/t/mlocate-does-not-find-files-in-home-on-fedora-33-btrfs/75073) ?

I'd be happy to contribute a solution myself, but without a DISTRIBUTORS.md i'm a bit lost at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions