* btrfs and mount in gentoo linux
@ 2014-07-08 19:07 Stefan G. Weichinger
2014-07-08 20:19 ` Holger Hoffstätte
2014-07-08 20:20 ` Chris Murphy
0 siblings, 2 replies; 8+ messages in thread
From: Stefan G. Weichinger @ 2014-07-08 19:07 UTC (permalink / raw)
To: linux-btrfs
Hello, btrfs-mailing-list,
I already tried to contact Chris Mason via pm but so far I didn't get a
reply so I taking this approach now:
I am a happy btrfs-user with gentoo linux for some time now and noticed
that the command "mount" does not show me which subvolid is mounted where.
eg.
# mount | grep sda2
/dev/sda2 on /mnt/btrfs_pool1 type btrfs
(rw,noatime,compress=lzo,ssd,space_cache)
/dev/sda2 on /mnt/oopsfiles type btrfs
(rw,noatime,compress=lzo,ssd,space_cache)
/dev/sda2 on /home type btrfs (rw,noatime,compress=lzo,ssd,space_cache)
See?
I filed a bug against util-linux at bugs.gentoo.org:
https://bugs.gentoo.org/show_bug.cgi?id=510148
but as you see from Comment 5 it isn't resolved yet due to "don't know" ;-)
Can you tell me where the problem/solution might be located?
Is it a known behavior in a way ... ?
Thanks for looking into it, I appreciate it ... I will then see to
report things back at the gentoo bugzilla to help improving btrfs
support in gentoo!
Regards, Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: btrfs and mount in gentoo linux
2014-07-08 19:07 btrfs and mount in gentoo linux Stefan G. Weichinger
@ 2014-07-08 20:19 ` Holger Hoffstätte
2014-07-08 20:52 ` Stefan G. Weichinger
2014-07-08 20:20 ` Chris Murphy
1 sibling, 1 reply; 8+ messages in thread
From: Holger Hoffstätte @ 2014-07-08 20:19 UTC (permalink / raw)
To: linux-btrfs
On Tue, 08 Jul 2014 21:07:30 +0200, Stefan G. Weichinger wrote:
> I am a happy btrfs-user with gentoo linux for some time now and noticed
> that the command "mount" does not show me which subvolid is mounted where.
Interestingly I just found that this came up in Fedora some time ago:
https://bugzilla.redhat.com/show_bug.cgi?id=743118
findmnt seems to do the trick, so the underlying functionality in
libmnt seems to work. Maybe Debian's mount does something differently?
Holger
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: btrfs and mount in gentoo linux
2014-07-08 20:19 ` Holger Hoffstätte
@ 2014-07-08 20:52 ` Stefan G. Weichinger
2014-07-09 1:57 ` Qu Wenruo
0 siblings, 1 reply; 8+ messages in thread
From: Stefan G. Weichinger @ 2014-07-08 20:52 UTC (permalink / raw)
To: linux-btrfs
Am 08.07.2014 22:19, schrieb Holger Hoffstätte:
>
> On Tue, 08 Jul 2014 21:07:30 +0200, Stefan G. Weichinger wrote:
>
>> I am a happy btrfs-user with gentoo linux for some time now and noticed
>> that the command "mount" does not show me which subvolid is mounted where.
>
> Interestingly I just found that this came up in Fedora some time ago:
> https://bugzilla.redhat.com/show_bug.cgi?id=743118
>
> findmnt seems to do the trick, so the underlying functionality in
> libmnt seems to work. Maybe Debian's mount does something differently?
findmnt does not fully show the subvolids or names:
# findmnt | grep btrfs
/ /dev/sda3[/rootfs] btrfs
rw,noatime,compress=lzo,ssd,space_cache
├─/mnt/uncow /dev/sda3 btrfs
rw,noatime,compress=lzo,ssd,space_cache
└─/home/sgw /dev/mapper/_dev_sda4 btrfs
rw,noatime,compress=lzo,ssd,space_cache
The "[/rootfs]" is something in the right direction ...
S
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: btrfs and mount in gentoo linux
2014-07-08 20:52 ` Stefan G. Weichinger
@ 2014-07-09 1:57 ` Qu Wenruo
2014-07-09 9:15 ` Stefan G. Weichinger
0 siblings, 1 reply; 8+ messages in thread
From: Qu Wenruo @ 2014-07-09 1:57 UTC (permalink / raw)
To: lists, linux-btrfs
-------- Original Message --------
Subject: Re: btrfs and mount in gentoo linux
From: Stefan G. Weichinger <lists@xunil.at>
To: linux-btrfs@vger.kernel.org
Date: 2014年07月09日 04:52
> Am 08.07.2014 22:19, schrieb Holger Hoffstätte:
>> On Tue, 08 Jul 2014 21:07:30 +0200, Stefan G. Weichinger wrote:
>>
>>> I am a happy btrfs-user with gentoo linux for some time now and noticed
>>> that the command "mount" does not show me which subvolid is mounted where.
>> Interestingly I just found that this came up in Fedora some time ago:
>> https://bugzilla.redhat.com/show_bug.cgi?id=743118
>>
>> findmnt seems to do the trick, so the underlying functionality in
>> libmnt seems to work. Maybe Debian's mount does something differently?
> findmnt does not fully show the subvolids or names:
>
>
> # findmnt | grep btrfs
> / /dev/sda3[/rootfs] btrfs
> rw,noatime,compress=lzo,ssd,space_cache
> ├─/mnt/uncow /dev/sda3 btrfs
> rw,noatime,compress=lzo,ssd,space_cache
> └─/home/sgw /dev/mapper/_dev_sda4 btrfs
> rw,noatime,compress=lzo,ssd,space_cache
>
> The "[/rootfs]" is something in the right direction ...
The bug is that, if you don't use 'subvol=' mount option but use default
subvolume or 'subvolid=' mount option,
findmnt will not give the output.
Since 'subvol=' mount option differs from default subvolume mount or
'subvolid=' mount option in calling behavior,
'subvol=' uses mount_subtree() vfs call, which records subtree mount info.
On the other hand, default subvolume mount or 'subvolid=' mount does not
go through the vfs subtree mount
but use btrfs's implement, which does not report vfs submount.
I'll try to investigate further and find whether we can fix it to show
more info.
Thanks,
Qu
>
> S
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: btrfs and mount in gentoo linux
2014-07-09 1:57 ` Qu Wenruo
@ 2014-07-09 9:15 ` Stefan G. Weichinger
0 siblings, 0 replies; 8+ messages in thread
From: Stefan G. Weichinger @ 2014-07-09 9:15 UTC (permalink / raw)
To: Qu Wenruo, linux-btrfs
Am 09.07.2014 03:57, schrieb Qu Wenruo:
>> The "[/rootfs]" is something in the right direction ...
> The bug is that, if you don't use 'subvol=' mount option but use default
> subvolume or 'subvolid=' mount option,
> findmnt will not give the output.
Yes, that sounds true as I switched to mostly using 'subvolid=' over
times. I also use that in my fstab.
> Since 'subvol=' mount option differs from default subvolume mount or
> 'subvolid=' mount option in calling behavior,
> 'subvol=' uses mount_subtree() vfs call, which records subtree mount info.
> On the other hand, default subvolume mount or 'subvolid=' mount does not
> go through the vfs subtree mount
> but use btrfs's implement, which does not report vfs submount.
OK, good explanation ;-)
> I'll try to investigate further and find whether we can fix it to show
> more info.
Thanks a lot, I think this would be a more expectable behavior in the end.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: btrfs and mount in gentoo linux
2014-07-08 19:07 btrfs and mount in gentoo linux Stefan G. Weichinger
2014-07-08 20:19 ` Holger Hoffstätte
@ 2014-07-08 20:20 ` Chris Murphy
2014-07-08 20:50 ` Stefan G. Weichinger
1 sibling, 1 reply; 8+ messages in thread
From: Chris Murphy @ 2014-07-08 20:20 UTC (permalink / raw)
To: lists; +Cc: linux-btrfs
On Jul 8, 2014, at 1:07 PM, Stefan G. Weichinger <lists@xunil.at> wrote:
>
> Can you tell me where the problem/solution might be located?
> Is it a known behavior in a way … ?
It's known. Ubuntu has a patch so that mount shows subvolume names. This information is probably available on Gentoo with cat /proc/self/mountinfo.
Chris Murphy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: btrfs and mount in gentoo linux
2014-07-08 20:20 ` Chris Murphy
@ 2014-07-08 20:50 ` Stefan G. Weichinger
2014-07-08 21:27 ` Chris Murphy
0 siblings, 1 reply; 8+ messages in thread
From: Stefan G. Weichinger @ 2014-07-08 20:50 UTC (permalink / raw)
To: linux-btrfs
Am 08.07.2014 22:20, schrieb Chris Murphy:
>
> On Jul 8, 2014, at 1:07 PM, Stefan G. Weichinger <lists@xunil.at> wrote:
>>
>> Can you tell me where the problem/solution might be located?
>> Is it a known behavior in a way … ?
>
> It's known. Ubuntu has a patch so that mount shows subvolume names.
> This information is probably available on Gentoo with cat /proc/self/mountinfo.
Unfortunately no.
See example from my laptop:
# grep btrfs /proc/self/mountinfo
14 0 0:14 /rootfs / rw,noatime shared:1 - btrfs /dev/sda3
rw,compress=lzo,ssd,space_cache
51 14 0:14 / /mnt/uncow rw,noatime shared:19 - btrfs /dev/sda3
rw,compress=lzo,ssd,space_cache
156 14 0:35 / /home/sgw rw,noatime shared:117 - btrfs
/dev/mapper/_dev_sda4 rw,compress=lzo,ssd,space_cache
for reference: the subvols are:
# btrfs su list /
ID 256 gen 7982 top level 5 path rootfs
ID 275 gen 3972 top level 5 path __snapshots
ID 283 gen 3274 top level 275 path __snapshots/rootfs_2014_06_14
ID 288 gen 7465 top level 5 path uncow
What does the Ubuntu patch apply to? util-linux?
Thanks! Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: btrfs and mount in gentoo linux
2014-07-08 20:50 ` Stefan G. Weichinger
@ 2014-07-08 21:27 ` Chris Murphy
0 siblings, 0 replies; 8+ messages in thread
From: Chris Murphy @ 2014-07-08 21:27 UTC (permalink / raw)
To: Btrfs BTRFS
On Jul 8, 2014, at 2:50 PM, Stefan G. Weichinger <lists@xunil.at> wrote:
> Am 08.07.2014 22:20, schrieb Chris Murphy:
>>
>> On Jul 8, 2014, at 1:07 PM, Stefan G. Weichinger <lists@xunil.at> wrote:
>>>
>>> Can you tell me where the problem/solution might be located?
>>> Is it a known behavior in a way … ?
>>
>> It's known. Ubuntu has a patch so that mount shows subvolume names.
>> This information is probably available on Gentoo with cat /proc/self/mountinfo.
>
>
> Unfortunately no.
>
> See example from my laptop:
>
> # grep btrfs /proc/self/mountinfo
> 14 0 0:14 /rootfs / rw,noatime shared:1 - btrfs /dev/sda3
> rw,compress=lzo,ssd,space_cache
>
> 51 14 0:14 / /mnt/uncow rw,noatime shared:19 - btrfs /dev/sda3
> rw,compress=lzo,ssd,space_cache
>
> 156 14 0:35 / /home/sgw rw,noatime shared:117 - btrfs
> /dev/mapper/_dev_sda4 rw,compress=lzo,ssd,space_cache
Well it looks to me you have used mount -o subvol=rootfs for the first instance, but you've not mounted a subvolume at /mnt/uncow and /home/sgw.
What kernel version is this? And I thought the kernel was entirely responsible for the contents of /proc?
http://ur1.ca/hpk57
The fourth column lists subvol names.
>
> What does the Ubuntu patch apply to? util-linux?
No idea.
Chris Murphy
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-07-09 9:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-08 19:07 btrfs and mount in gentoo linux Stefan G. Weichinger
2014-07-08 20:19 ` Holger Hoffstätte
2014-07-08 20:52 ` Stefan G. Weichinger
2014-07-09 1:57 ` Qu Wenruo
2014-07-09 9:15 ` Stefan G. Weichinger
2014-07-08 20:20 ` Chris Murphy
2014-07-08 20:50 ` Stefan G. Weichinger
2014-07-08 21:27 ` Chris Murphy
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.