Updatedb.conf change for btrfs vanilla installs

I have yet to do much research as to why this needs changed, but on initial install /etc/updatedb.conf reads:

PRUNE_BIND_MOUNTS = “yes”

Which prevents updatedb/mlocate/plocate from indexing anything you might actually want indexed. You need to change it to:

PRUNE_BIND_MOUNTS = “no”

EDIT: I’m a dunce, forgot config files can have man pages too. Why my config file had been set to prune bind mounts, as it is not the default, is well outside my wheelhouse. From the man(5) page of updatedb.conf:

       PRUNE_BIND_MOUNTS
              One  of  the strings 0, no, 1 or yes.  If PRUNE_BIND_MOUNTS is 1 or yes, bind mounts are not scanned
              by updatedb(8).  All file systems mounted in the subtree of a bind mount are skipped as  well,  even
              if they are not bind mounts.  As an exception, bind mounts of a directory on itself are not skipped.
              Note that Btrfs subvolume mounts are handled internally in the kernel as bind mounts (see btrfs-sub‐
              volume(8)), and thus, may get skipped if you have also mounted the filesystem root itself.  To coun‐
              teract this, make your root directory a Btrfs subvolume, too.

              By default, bind mounts are not skipped.

Can you share the output of findmnt from your system?

❯ cat findmnt_edited.txt 
TARGET                                                  SOURCE                  FSTYPE      OPTIONS
/                                                       /dev/nvme0n1p2[/@]      btrfs       rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/@
├─/proc                                                 proc                    proc        rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc                            systemd-1               autofs      rw,relatime,fd=33,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=1371
│   └─/proc/sys/fs/binfmt_misc                          binfmt_misc             binfmt_misc rw,nosuid,nodev,noexec,relatime
├─/sys                                                  sysfs                   sysfs       rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security                                securityfs              securityfs  rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup                                      cgroup2                 cgroup2     rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot
│ ├─/sys/fs/pstore                                      pstore                  pstore      rw,nosuid,nodev,noexec,relatime
│ ├─/sys/firmware/efi/efivars                           efivarfs                efivarfs    rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/bpf                                         bpf                     bpf         rw,nosuid,nodev,noexec,relatime,mode=700
│ ├─/sys/kernel/debug                                   debugfs                 debugfs     rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/tracing                                 tracefs                 tracefs     rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/fuse/connections                            fusectl                 fusectl     rw,nosuid,nodev,noexec,relatime
│ └─/sys/kernel/config                                  configfs                configfs    rw,nosuid,nodev,noexec,relatime
├─/dev                                                  devtmpfs                devtmpfs    rw,nosuid,size=4096k,nr_inodes=2028798,mode=755,inode64
│ ├─/dev/shm                                            tmpfs                   tmpfs       rw,nosuid,nodev,inode64
│ ├─/dev/pts                                            devpts                  devpts      rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ ├─/dev/hugepages                                      hugetlbfs               hugetlbfs   rw,relatime,pagesize=2M
│ └─/dev/mqueue                                         mqueue                  mqueue      rw,nosuid,nodev,noexec,relatime
├─/run                                                  tmpfs                   tmpfs       rw,nosuid,nodev,size=3252544k,nr_inodes=819200,mode=755,inode64
│ ├─/run/credentials/systemd-sysctl.service             ramfs                   ramfs       ro,nosuid,nodev,noexec,relatime,mode=700
│ ├─/run/credentials/systemd-sysusers.service           ramfs                   ramfs       ro,nosuid,nodev,noexec,relatime,mode=700
│ ├─/run/credentials/systemd-tmpfiles-setup-dev.service ramfs                   ramfs       ro,nosuid,nodev,noexec,relatime,mode=700
│ ├─/run/user/1000                                      tmpfs                   tmpfs       rw,nosuid,nodev,relatime,size=1626268k,nr_inodes=406567,mode=700,uid=1000,gid=1001,inode64
│ │ └─/run/user/1000/doc                                portal                  fuse.portal rw,nosuid,nodev,relatime,user_id=1000,group_id=1001
│ ├─/run/credentials/systemd-tmpfiles-setup.service     ramfs                   ramfs       ro,nosuid,nodev,noexec,relatime,mode=700
│ ├─/run/media/MyName/MJRO1815                           /dev/sda2               iso9660     ro,nosuid,nodev,relatime,nojoliet,check=s,map=n,blocksize=2048,uid=1000,gid=1001,dmode=500,fmode=400,iocharset=utf8
│ └─/run/media/MyName/Ventoy                             /dev/sdb1               exfat       rw,nosuid,nodev,relatime,uid=1000,gid=1001,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro
├─/home                                                 /dev/nvme0n1p2[/@home]  btrfs       rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@home
│ ├─/home/MyName/ext                                     systemd-1               autofs      rw,relatime,fd=53,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=18438
│ │ └─/home/MyName/ext                                   /dev/sda1               ext4        rw,nosuid,nodev,noexec,relatime
│ ├─/home/MyName/rtorrent                                systemd-1               autofs      rw,relatime,fd=54,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=18443
│ │ └─/home/MyName/rtorrent                              //256.256.256.1/rtorrent     cifs        rw,relatime,vers=3.1.1,cache=strict,username=MyName,uid=1000,noforceuid,gid=0,noforcegid,addr=256.256.256.1,file_mode=0755,dir_mode=0755,iocharset=utf8,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=1
│ └─/home/MyName/rtorrent2                               systemd-1               autofs      rw,relatime,fd=55,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=18449
│   └─/home/MyName/rtorrent2                             //256.256.256.1/rtorrent_old cifs        rw,relatime,vers=3.1.1,cache=strict,username=MyName,uid=1000,noforceuid,gid=0,noforcegid,addr=256.256.256.1,file_mode=0755,dir_mode=0755,iocharset=utf8,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=1
├─/var/cache                                            /dev/nvme0n1p2[/@cache] btrfs       rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=258,subvol=/@cache
├─/var/log                                              /dev/nvme0n1p2[/@log]   btrfs       rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=259,subvol=/@log
├─/efi                                                  /dev/nvme0n1p1          vfat        rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro
└─/tmp                                                  tmpfs                   tmpfs       rw,noatime,inode64

~/tmp 
❯ 

Are you using timeshift?

No. Package is not even installed. Syncthing for one comparatively small directory in home. This is a relatively new install, first time eos and comparatively unadulterated. Except for choosing btrfs it was just a ‘hit the yes button’ install.

Hmm…I can’t replicate it on my side. Even with PRUNE_BIND_MOUNTS = “yes” btrfs filesystems seem to be getting indexed.

A search does find some older posts describing that to be an issue with mlocate with people switching to plocate to solve it.

However, in my testing both are able to index btrfs filesystems just fine.

Huh. Yeah…before I made that change nothing in my home directory was ‘locate-able’. If I switch it back to “yes” and updatedb, home and a large portion of the filesystem is not indexed. Still need to research what even is a bind mount.

I mean…it must have something to do with the way my ‘partitions’ are all weird. Output from df, notice the shared space. I chalked that up to not having used btrfs before and not yet having learned about it:

/dev/nvme0n1p2           1.9T  231G  1.6T  13% /
/dev/nvme0n1p2           1.9T  231G  1.6T  13% /home
/dev/nvme0n1p2           1.9T  231G  1.6T  13% /var/cache
/dev/nvme0n1p2           1.9T  231G  1.6T  13% /var/log