Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dave@jikos.cz>
To: Gene Czarcinski <gene@czarc.net>
Cc: linux-btrfs Mailing list <linux-btrfs@vger.kernel.org>,
	Chris Murphy <lists@colorremedies.com>
Subject: Re: Another novice question & comment
Date: Fri, 28 Dec 2012 00:06:02 +0100	[thread overview]
Message-ID: <20121227230602.GC22426@twin.jikos.cz> (raw)
In-Reply-To: <50DC9E23.5070009@czarc.net>

On Thu, Dec 27, 2012 at 02:14:43PM -0500, Gene Czarcinski wrote:
> On 12/27/2012 11:07 AM, Chris Murphy wrote:
> >On Dec 27, 2012, at 7:29 AM, Gene Czarcinski <gene@czarc.net> wrote:
> >
> >>OK, this is from inside a shell.  I have a btrfs volume or a btrfs subvolume on some arbitrary mount mount.  Is there some way to tell if it is a btrfs volume or a btrfs subvolume that is mounted?
> >cat /proc/self/mountinfo | grep btrfs
> >
> >That will show you what subvol is mounted and where, subvol is the 4th column, mountpoint is the fifth.
> Thank you.  That is just what I needed.

Please note that the value of 4th column does not reflect the default
subvolume.

$ [mkfs]
$ [mount && cd]
$ btrfs subvol create subv1 && touch subv1/.subv1
$ btrfs subvol set-default 256 .
$ cat /proc/self/mountinfo
30 21 0:19 / /mnt/test rw,relatime - btrfs /dev/loop2 rw,space_cache
$ [umount]
$ mount /dev/sdx mnt && cd mnt
$ ls
.subv1
$ cat /proc/self/mountinfo
30 21 0:19 / /mnt/test rw,relatime - btrfs /dev/loop2 rw,space_cache

both say '/' while the subvolume mounted is different.

There are some unresolved technical obstacles, so this is not yet
implemented and I'm not aware of a workaround.


david

      reply	other threads:[~2012-12-27 23:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27 14:29 Another novice question & comment Gene Czarcinski
2012-12-27 15:03 ` Hugo Mills
2012-12-27 16:47   ` Swâmi Petaramesh
2012-12-27 16:55     ` Chris Murphy
     [not found]       ` <50DC7F85.4020807@petaramesh.org>
2012-12-27 19:25         ` Chris Murphy
2012-12-27 19:27           ` Swâmi Petaramesh
2012-12-27 19:35             ` Chris Murphy
2012-12-27 22:10               ` Swâmi Petaramesh
2012-12-27 19:27       ` Gene Czarcinski
2012-12-27 19:29         ` Swâmi Petaramesh
2012-12-27 19:37         ` Chris Murphy
2012-12-28  0:34           ` Russell Coker
2012-12-28  5:03             ` Chris Murphy
2012-12-27 16:07 ` Chris Murphy
2012-12-27 19:14   ` Gene Czarcinski
2012-12-27 23:06     ` David Sterba [this message]

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=20121227230602.GC22426@twin.jikos.cz \
    --to=dave@jikos.cz \
    --cc=gene@czarc.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.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