From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Hugo Mills <hugo@carfax.org.uk>,
Juan Orti Alcaine <juan.orti@miceliux.com>,
<linux-btrfs@vger.kernel.org>
Subject: Re: Identify mounted subvolume
Date: Tue, 7 Oct 2014 17:18:51 +0800 [thread overview]
Message-ID: <5433AFFB.20101@cn.fujitsu.com> (raw)
In-Reply-To: <20141007090608.GE11870@carfax.org.uk>
-------- Original Message --------
Subject: Re: Identify mounted subvolume
From: Hugo Mills <hugo@carfax.org.uk>
To: Juan Orti Alcaine <juan.orti@miceliux.com>
Date: 2014年10月07日 17:06
> On Tue, Oct 07, 2014 at 10:47:56AM +0200, Juan Orti Alcaine wrote:
>> I cannot find the answer to this one. How can I determine which subvolume I
>> have mounted in a certain path? I'm looking through /sys but no clue.
> Rumour has it that /proc/self/mountinfo is meant to have the
> information, but I've just checked, and it doesn't seem to have the
> subvol in it on my server (3.16.2).
>
> Hugo.
>
This accepted patch will make /proc/self/mountinfo to have all the info.
https://patchwork.kernel.org/patch/4593831/
But I didn't see it in 3.17 kernel or integration branch, maybe next
merge window?
Even without the patch, when mounting using '-o subvol=' mount option
will also fill the /proc/self/mountinfo,
using 3.16.4.
---
149 19 0:39 / /mnt/btrfs rw,relatime shared:101 - btrfs /dev/sda6
rw,space_cache
153 19 0:39 */subvol1* /mnt/other rw,relatime shared:104 - btrfs
/dev/sda6 rw,space_cache
---
On the other hand, without the patch and you mount with '-o subvolid=',
then mountinfo will not help.
Thanks,
Qu
next prev parent reply other threads:[~2014-10-07 9:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 8:47 Identify mounted subvolume Juan Orti Alcaine
2014-10-07 9:06 ` Hugo Mills
2014-10-07 9:18 ` Qu Wenruo [this message]
2014-10-07 9:26 ` Hugo Mills
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=5433AFFB.20101@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=hugo@carfax.org.uk \
--cc=juan.orti@miceliux.com \
--cc=linux-btrfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).