From: Hugo Mills <hugo@carfax.org.uk>
To: Rich Turner <rturner@storix.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: which subvolume is mounted?
Date: Fri, 31 Oct 2014 16:35:01 +0000 [thread overview]
Message-ID: <20141031163501.GG907@carfax.org.uk> (raw)
In-Reply-To: <CFAACED5-055D-4586-A474-CA610881F367@storix.com>
[-- Attachment #1: Type: text/plain, Size: 2366 bytes --]
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.
It's in /proc/self/mountinfo -- look at the fourth field in the
table, which is the subvolume within the FS. Completely non-obvious,
I'm afraid, but at least it is there. (Apparently there were some
problems with getting the information into /proc/mounts).
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
--- Great films about cricket: Silly Point Break ---
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-11-01 12:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 16:23 which subvolume is mounted? Rich Turner
2014-10-31 16:35 ` Hugo Mills [this message]
2014-10-31 20:18 ` Hugo Mills
2014-11-01 7:38 ` Duncan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141031163501.GG907@carfax.org.uk \
--to=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=rturner@storix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox