Thread (21 messages) 21 messages, 7 authors, 2017-08-23

Re: finding root filesystem of a subvolume?

From: Peter Grandi <hidden>
Date: 2017-08-22 17:41:44

[ ... ]
quoted
There is no fixed relationship between the root directory
inode of a subvolume and the root directory inode of any
other subvolume or the main volume.
Actually, there is, because it's inherently rooted in the
hierarchy of the volume itself. That root inode for the
subvolume is anchored somewhere under the next higher
subvolume.
This stupid point relies on ignoring that it is not mandatory to
mount the main volume, and that therefore "There is no fixed
relationship between the root directory inode of a subvolume and
the root directory inode of any other subvolume or the main
volume", because the "root directory inode" of the "main volume"
may not be mounted at all.

This stupid point also relies on ignoring that subvolumes can be
mounted *also* under another directory, even if the main volume
is mounted somewhere else. Suppose that the following applies:

  subvol=5	/local
  subvol=383	/local/.backup/home
  subvol=383	/mnt/home-backup

and you are given the mountpoint '/mnt/home-backup', how can you
find the main volume mountpoint '/local' from that?

Please explain how '/mnt/home-backup' is indeed "inherently
rooted in the hierarchy of the volume itself", because there is
always a "fixed relationship between the root directory inode of
a subvolume and the root directory inode of any other subvolume
or the main volume".

[ ... ]
Again, it does, it's just not inherently exposed to userspace
unless you mount the top-level subvolume (subvolid=5 and/or
subvol=/ in mount options).
This extra stupid point is based on ignoring that to "mount the
top-level subvolume" relies on knowing already which one is the
"top-level subvolume", which is begging the question.

[ ... ]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help