On Mon, May 02, 2022 at 05:46:42PM +0200, Steinar H. Gunderson wrote:
> On Mon, May 02, 2022 at 05:23:08PM +0200, Julian Andres Klode wrote:
> > plocate considers all mount points of a btrfs as bind mounts,
> > so when I have a somewhat usual case of subvolumes, e.g.
> 
> Hi,
> 
> It considers them as bind mounts because btrfs implements subvolumes
> as bind mounts. This is documented in updatedb.conf(5) (which refers to
> btrfs-subvolume(8) and shows a workaround), so I'm closing this.

It says to make / as subvolume as well, which seems incomplete, as
mounted at / is the subvolume @ (that's the standard Ubuntu layout);
the actual non-subvolume / is only mounted at /mnt for managing
snapshots (later /var/lib/apt-btrfs-snapshot).

updatedb needs to parse /proc/mounts, look for subvol= flag, and
for each subvol= traverse the shortest path (or first path it sees).

Essentially this is broken for btrfs users now unless they only
mount once. Which doesn't *always* work for various reasons, e.g.
if you want to snapshot / but not /var/log, you have to have them
be subvolumes /@ and /@log such that you backup the former. If you
had / and /var/log were a direct subvolume, you'd lose it on restore.
-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en

Reply via email to