From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from twin.jikos.cz ([89.185.236.188]:56103 "EHLO twin.jikos.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974Ab2L0XGS (ORCPT ); Thu, 27 Dec 2012 18:06:18 -0500 Date: Fri, 28 Dec 2012 00:06:02 +0100 From: David Sterba To: Gene Czarcinski Cc: linux-btrfs Mailing list , Chris Murphy Subject: Re: Another novice question & comment Message-ID: <20121227230602.GC22426@twin.jikos.cz> Reply-To: dave@jikos.cz References: <50DC5B51.9060506@czarc.net> <0290535D-CBF3-4059-AEF8-3E3A64ABC223@colorremedies.com> <50DC9E23.5070009@czarc.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <50DC9E23.5070009@czarc.net> Sender: linux-btrfs-owner@vger.kernel.org List-ID: 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 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