Package: mlocate
Version: 0.26-1
Severity: normal

Dear maintainer,

mlocate records files in my /, but not in my /home.

I'm using 2 btrfs subvolumes, one for / and one for /home. Such
subvolumes (which reside on the same physical partition from a /dev/*
point of view) are presented to the system similar to bind mounts:

# egrep sdb3 /proc/self/mountinfo
20 1 0:16 /@jessie / rw,relatime - btrfs /dev/sdb3 rw,space_cache
26 20 0:16 /@home /home rw,relatime - btrfs /dev/sdb3 rw,space_cache

Running updatedb with --debug-pruning shows that it apparently prunes
/home because it thinks it's a bind mount path:

# updatedb --debug-pruning
...
Rebuilding bind_mount_paths:
 `/sys' (15 on 20) is `/' of `sysfs' (0:14), type `sysfs'
 `/proc' (16 on 20) is `/' of `proc' (0:3), type `proc'
 `/dev' (17 on 20) is `/' of `udev' (0:5), type `devtmpfs'
 `/dev/pts' (18 on 17) is `/' of `devpts' (0:11), type `devpts'
 `/run' (19 on 20) is `/' of `tmpfs' (0:15), type `tmpfs'
 `/' (20 on 1) is `/@jessie' of `/dev/sdb3' (0:16), type `btrfs'
 `/run/lock' (21 on 19) is `/' of `tmpfs' (0:19), type `tmpfs'
 `/sys/fs/pstore' (22 on 15) is `/' of `pstore' (0:20), type `pstore'
 `/run/shm' (23 on 19) is `/' of `tmpfs' (0:21), type `tmpfs'
 `/sys/fs/fuse/connections' (24 on 15) is `/' of `fusectl' (0:23), type
`fusectl'
 `/boot/efi' (25 on 20) is `/' of `/dev/sda2' (8:2), type `vfat'
 `/home' (26 on 20) is `/@home' of `/dev/sdb3' (0:16), type `btrfs'
 `/proc/sys/fs/binfmt_misc' (27 on 16) is `/' of `binfmt_misc' (0:25),
type `binfmt_misc'
 `/sys/fs/cgroup' (29 on 15) is `/' of `none' (0:26), type `tmpfs'
 `/sys/fs/cgroup/systemd' (30 on 29) is `/' of `systemd' (0:27), type
`cgroup'
Matching bind_mount_paths:
 => adding `/home'
...done
Checking whether filesystem `/boot/efi' is excluded:
...
Skipping `/home': bind mount
...

Treating it as a bind mount path is not wrong per se, but it seems to
subordinate it to my / (which it doesn't prune), which is wrong.

My / and /home have no common mounted root subvol and so should both be
scanned.

Even if I mount my root subvolume on /mnt/tmp, it doesn't work correctly:

# egrep sdb3 /proc/self/mountinfo
20 1 0:16 /@jessie / rw,relatime - btrfs /dev/sdb3 rw,space_cache
26 20 0:16 /@home /home rw,relatime - btrfs /dev/sdb3 rw,space_cache
31 20 0:16 / /mnt/tmp rw,relatime - btrfs /dev/sdb3 rw,space_cache

# updatedb --debug-pruning
...
Rebuilding bind_mount_paths:
 `/sys' (15 on 20) is `/' of `sysfs' (0:14), type `sysfs'
 `/proc' (16 on 20) is `/' of `proc' (0:3), type `proc'
 `/dev' (17 on 20) is `/' of `udev' (0:5), type `devtmpfs'
 `/dev/pts' (18 on 17) is `/' of `devpts' (0:11), type `devpts'
 `/run' (19 on 20) is `/' of `tmpfs' (0:15), type `tmpfs'
 `/' (20 on 1) is `/@jessie' of `/dev/sdb3' (0:16), type `btrfs'
 `/run/lock' (21 on 19) is `/' of `tmpfs' (0:19), type `tmpfs'
 `/sys/fs/pstore' (22 on 15) is `/' of `pstore' (0:20), type `pstore'
 `/run/shm' (23 on 19) is `/' of `tmpfs' (0:21), type `tmpfs'
 `/sys/fs/fuse/connections' (24 on 15) is `/' of `fusectl' (0:23), type
`fusectl'
 `/boot/efi' (25 on 20) is `/' of `/dev/sda2' (8:2), type `vfat'
 `/home' (26 on 20) is `/@home' of `/dev/sdb3' (0:16), type `btrfs'
 `/proc/sys/fs/binfmt_misc' (27 on 16) is `/' of `binfmt_misc' (0:25),
type `binfmt_misc'
 `/sys/fs/cgroup' (29 on 15) is `/' of `none' (0:26), type `tmpfs'
 `/sys/fs/cgroup/systemd' (30 on 29) is `/' of `systemd' (0:27), type
`cgroup'
 `/mnt/tmp' (31 on 20) is `/' of `/dev/sdb3' (0:16), type `btrfs'
Matching bind_mount_paths:
 => adding `/home'
 => adding `/mnt/tmp'
...done
Checking whether filesystem `/boot/efi' is excluded:
...
Skipping `/home': bind mount
Skipping `/media': in prunepaths
Skipping `/mnt/tmp': bind mount
...

It scans /, but skips /home and /mnt/tmp.
I expect it to scan /mnt/tmp (which is subvol /) and skip / and /home
(which are subvols /@jessie and /@home, respectively) instead.

The workaround for now is to disable pruning bind mounts.


Regards
Niels Boehm


-- System Information:
Debian Release: jessie/sid
  APT prefers testing-proposed-updates
  APT policy: (930, 'testing-proposed-updates'), (930,
'stable-updates'), (930, 'testing'), (930, 'stable'), (830,
'proposed-updates'), (830, 'stable'), (90, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mlocate depends on:
ii  adduser  3.113+nmu3
ii  libc6    2.18-5

mlocate recommends no packages.

mlocate suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to