* mount command now shows subvol and subvolid
@ 2015-08-30 17:17 Chris Murphy
2015-08-31 6:15 ` Omar Sandoval
2015-08-31 13:45 ` David Sterba
0 siblings, 2 replies; 5+ messages in thread
From: Chris Murphy @ 2015-08-30 17:17 UTC (permalink / raw)
To: Btrfs BTRFS
Does anyone know when this changed? Maybe it's a 4.2 thing... anyway
it's very much welcome!
/dev/sda2 on /home type btrfs
(rw,relatime,seclabel,space_cache,subvolid=258,subvol=/home)
/dev/sdc1 on /brick0 type btrfs
(rw,relatime,seclabel,space_cache,subvolid=5,subvol=/)
/dev/sde on /brick1 type btrfs
(rw,relatime,seclabel,space_cache,subvolid=5,subvol=/)
--
Chris Murphy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mount command now shows subvol and subvolid
2015-08-30 17:17 mount command now shows subvol and subvolid Chris Murphy
@ 2015-08-31 6:15 ` Omar Sandoval
2015-08-31 13:45 ` David Sterba
1 sibling, 0 replies; 5+ messages in thread
From: Omar Sandoval @ 2015-08-31 6:15 UTC (permalink / raw)
To: Chris Murphy; +Cc: Btrfs BTRFS
On Sun, Aug 30, 2015 at 11:17:44AM -0600, Chris Murphy wrote:
> Does anyone know when this changed? Maybe it's a 4.2 thing... anyway
> it's very much welcome!
>
> /dev/sda2 on /home type btrfs
> (rw,relatime,seclabel,space_cache,subvolid=258,subvol=/home)
>
> /dev/sdc1 on /brick0 type btrfs
> (rw,relatime,seclabel,space_cache,subvolid=5,subvol=/)
>
> /dev/sde on /brick1 type btrfs
> (rw,relatime,seclabel,space_cache,subvolid=5,subvol=/)
>
>
>
>
> --
> Chris Murphy
Yup, 4.2 :)
c8d3fe028f64 Btrfs: show subvol= and subvolid= in /proc/mounts
05dbe6837b60 Btrfs: unify subvol= and subvolid= mounting
bb289b7be62d Btrfs: fail on mismatched subvol and subvolid mount options
fa3306595071 Btrfs: clean up error handling in mount_subvol()
e6e4dbe894ef Btrfs: remove all subvol options before mounting top-level
773cd04ec191 Btrfs: lock superblock before remounting for rw subvol
--
Omar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mount command now shows subvol and subvolid
2015-08-30 17:17 mount command now shows subvol and subvolid Chris Murphy
2015-08-31 6:15 ` Omar Sandoval
@ 2015-08-31 13:45 ` David Sterba
2015-09-01 7:17 ` Duncan
1 sibling, 1 reply; 5+ messages in thread
From: David Sterba @ 2015-08-31 13:45 UTC (permalink / raw)
To: Chris Murphy; +Cc: Btrfs BTRFS
On Sun, Aug 30, 2015 at 11:17:44AM -0600, Chris Murphy wrote:
> Does anyone know when this changed? Maybe it's a 4.2 thing... anyway
> it's very much welcome!
And another "side effect" is that /proc/self/mountinfo will report the
mounted subvolume, even if it was an implicit mount of non-toplevel
subvolume.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mount command now shows subvol and subvolid
2015-08-31 13:45 ` David Sterba
@ 2015-09-01 7:17 ` Duncan
2015-09-01 10:24 ` Karel Zak
0 siblings, 1 reply; 5+ messages in thread
From: Duncan @ 2015-09-01 7:17 UTC (permalink / raw)
To: linux-btrfs
David Sterba posted on Mon, 31 Aug 2015 15:45:17 +0200 as excerpted:
> On Sun, Aug 30, 2015 at 11:17:44AM -0600, Chris Murphy wrote:
>> Does anyone know when this changed? Maybe it's a 4.2 thing... anyway
>> it's very much welcome!
>
> And another "side effect" is that /proc/self/mountinfo will report the
> mounted subvolume, even if it was an implicit mount of non-toplevel
> subvolume.
Another very nice side effect, likely accidental, but still very nice...
is how subvol= ends up being reported for bind-mounts.
I don't use subvolumes here, but I do use multiple separate btrfs, so
subvolid=5, subvol=/ for all of them, would be technically correct, if
not particularly useful. But while the subvolid=5 is indeed constant
(and actually useful given the following), subvol= turns out to be rather
more helpful than the / that would normally be expected.
I have a number of bind-mounts. Formerly mount's output for these wasn't
particularly helpful, since I ended up with a number of...
/dev/sda5 on <mountpoint> ...
... lines (/dev/sda5 being my rootfs), for instance. The mountpoint is
listed, but exactly what part of the filesystem is being bind-mounted
there isn't (tho /proc/self/mountinfo does contain it). While the
filesystem component (/etc/bind, for instance) actually being bind-
mounted was generally what I was interested in, it wasn't actually
displayed, and could only be indirectly derived from the mountpoint,
by looking up the mountpoint in fstab, for instance, or by using /proc/
self/mountinfo instead of the mount output or /proc/mounts.
With the new subvolume thing, despite the fact that as I said I don't use
subvolumes so subvolume=/ would be technically correct, the subvol= now
points at the particular component of the filesystem being bind-mounted
at the given mountpoint.
So while I still have a bunch of /dev/sda5 on <mountpoint> lines, now the
subvolume= bit actually tells me what's bind-mounted there, as in (sda5
is /, sda4 is /var/log)...
/dev/sda5 on /mnt/cbind/etc/bind type btrfs (...,subvol=/etc/bind)
/dev/sda4 on /mnt/cbind/var/log/named type btrfs (...,subvol=/named)
Again, technically the subvol is actually / in both cases, since I don't
use subvols. And the subvolid is indeed 5, as expected. But the
actually reported subvol=/etc/bind is *so* much more helpful than the
subvol=/ that I might have expected. =:^)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mount command now shows subvol and subvolid
2015-09-01 7:17 ` Duncan
@ 2015-09-01 10:24 ` Karel Zak
0 siblings, 0 replies; 5+ messages in thread
From: Karel Zak @ 2015-09-01 10:24 UTC (permalink / raw)
To: Duncan; +Cc: linux-btrfs
On Tue, Sep 01, 2015 at 07:17:53AM +0000, Duncan wrote:
> David Sterba posted on Mon, 31 Aug 2015 15:45:17 +0200 as excerpted:
>
> > On Sun, Aug 30, 2015 at 11:17:44AM -0600, Chris Murphy wrote:
> >> Does anyone know when this changed? Maybe it's a 4.2 thing... anyway
> >> it's very much welcome!
> >
> > And another "side effect" is that /proc/self/mountinfo will report the
> > mounted subvolume, even if it was an implicit mount of non-toplevel
> > subvolume.
>
> Another very nice side effect, likely accidental, but still very nice...
> is how subvol= ends up being reported for bind-mounts.
>
> I don't use subvolumes here, but I do use multiple separate btrfs, so
> subvolid=5, subvol=/ for all of them, would be technically correct, if
> not particularly useful. But while the subvolid=5 is indeed constant
> (and actually useful given the following), subvol= turns out to be rather
> more helpful than the / that would normally be expected.
>
> I have a number of bind-mounts. Formerly mount's output for these wasn't
> particularly helpful, since I ended up with a number of...
>
> /dev/sda5 on <mountpoint> ...
Try findmnt(8) rather than mount(8).
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-01 10:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-30 17:17 mount command now shows subvol and subvolid Chris Murphy
2015-08-31 6:15 ` Omar Sandoval
2015-08-31 13:45 ` David Sterba
2015-09-01 7:17 ` Duncan
2015-09-01 10:24 ` Karel Zak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.