Thread (12 messages) 12 messages, 6 authors, 2012-12-28

Re: Another novice question & comment

From: David Sterba <hidden>
Date: 2012-12-27 23:06:18

On Thu, Dec 27, 2012 at 02:14:43PM -0500, Gene Czarcinski wrote:
On 12/27/2012 11:07 AM, Chris Murphy wrote:
quoted
On Dec 27, 2012, at 7:29 AM, Gene Czarcinski [off-list ref] wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help