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 <[email protected]> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
