On Fri, Oct 31, 2014 at 09:23:27AM -0700, Rich Turner wrote: > let’s first assume the contents of /etc/fstab are either not used or invalid > in mounting the subvolumes. given the following ‘df’ command, how do i know > which subvolume of the btrfs filesystem on /dev/sda3 is mounted at each mount > point (/, /var, /opt, /home)? i would have expected to see the mount option > used to define the subvolume (subvolid or subvol option) in /proc/mounts.
I already answered this on IRC, but just for the record (and to test whether my mail is working): it's in /proc/self/mountinfo. The fourth field of each line is the location that the mountpoint came from in the filesystem, which is what you're after. Hugo. > # df > Filesystem 1K-blocks Used Available Use% Mounted on > /dev/sda3 6839296 1698564 4903212 26% / > devtmpfs 501464 0 501464 0% /dev > tmpfs 507316 0 507316 0% /dev/shm > tmpfs 507316 6720 500596 2% /run > tmpfs 507316 0 507316 0% /sys/fs/cgroup > /dev/sda3 6839296 1698564 4903212 26% /var > /dev/sda3 6839296 1698564 4903212 26% /opt > /dev/sda3 6839296 1698564 4903212 26% /home > /dev/sda1 517868 93040 424828 18% /boot > > # btrfs subvolume list -a --sort=+rootid / > ID 257 gen 7800 top level 5 path <FS_TREE>/root > ID 258 gen 4127 top level 5 path <FS_TREE>/home > ID 259 gen 7801 top level 5 path <FS_TREE>/var > ID 260 gen 7795 top level 5 path <FS_TREE>/opt > > # uname -a > Linux turner11.storix 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT > 2014 x86_64 x86_64 x86_64 GNU/Linux > > # btrfs --version > Btrfs v3.12 > > # btrfs fi show > Label: rhel_turner11 uuid: cd3c0e50-d726-44e2-9bfa-19b11614136a > Total devices 1 FS bytes used 1.62GiB > devid 1 size 6.52GiB used 2.24GiB path /dev/sda3 > > Btrfs v3.12 > > # btrfs fi df / > Data, single: total=1.98GiB, used=1.58GiB > System, single: total=4.00MiB, used=16.00KiB > Metadata, single: total=264.00MiB, used=36.03MiB > > > -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Your problem is that you've got too much taste to be --- a web developer
signature.asc
Description: Digital signature