* REQ: btrfs list <subvols only> option
@ 2014-01-09 1:31 Alex
2014-01-09 1:42 ` Chris Murphy
0 siblings, 1 reply; 8+ messages in thread
From: Alex @ 2014-01-09 1:31 UTC (permalink / raw)
To: linux-btrfs
Hello
(Using btrfs userland 3.12)
I have my fs set up (below) I borrowed the Ubuntu scheme.
<FS_TREE>/@/
<FS_TREE>/@/etc
<FS_TREE>/@/var
..
get-default is 5 i.e. <FS_TREE>
AFAICT, perhaps I'm missing the obvious, getting the list of subvolumes only
(no snapshots) is no longer trivial?
# btrfs sub list /@
ERROR: can't access '/@'
# btrfs sub list /@
ERROR: can't access '/@'
# btrfs sub list /@/
ERROR: can't access '/@/'
# btrfs sub list @/
ERROR: can't access '@/'
# btrfs sub list @
I know I'm going to be embarrassed at the answer, but go ahead bite me!
Thank you!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REQ: btrfs list <subvols only> option
2014-01-09 1:31 REQ: btrfs list <subvols only> option Alex
@ 2014-01-09 1:42 ` Chris Murphy
2014-01-09 4:06 ` Alex
0 siblings, 1 reply; 8+ messages in thread
From: Chris Murphy @ 2014-01-09 1:42 UTC (permalink / raw)
To: Alex; +Cc: linux-btrfs
On Jan 8, 2014, at 6:31 PM, Alex <alex@bpmit.com> wrote:
> Hello
>
> (Using btrfs userland 3.12)
>
> I have my fs set up (below) I borrowed the Ubuntu scheme.
>
> <FS_TREE>/@/
> <FS_TREE>/@/etc
> <FS_TREE>/@/var
> ..
>
> get-default is 5 i.e. <FS_TREE>
>
> AFAICT, perhaps I'm missing the obvious, getting the list of subvolumes only
> (no snapshots) is no longer trivial?
>
> # btrfs sub list /@
> ERROR: can't access '/@'
> # btrfs sub list /@
> ERROR: can't access '/@'
> # btrfs sub list /@/
> ERROR: can't access '/@/'
> # btrfs sub list @/
> ERROR: can't access '@/'
> # btrfs sub list @
>
> I know I'm going to be embarrassed at the answer, but go ahead bite me!
Specify the mount point for the Btrfs file system and it will list all subvols on that file system.
Chris Murphy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REQ: btrfs list <subvols only> option
2014-01-09 1:42 ` Chris Murphy
@ 2014-01-09 4:06 ` Alex
2014-01-09 6:27 ` Chris Murphy
2014-01-09 12:20 ` Wang Shilong
0 siblings, 2 replies; 8+ messages in thread
From: Alex @ 2014-01-09 4:06 UTC (permalink / raw)
To: linux-btrfs
Chris Murphy <lists <at> colorremedies.com> writes:
> Specify the mount point for the Btrfs file system and it will list all
subvols on that file system.
>
> Chris Murphy--
Thank you Chris.
When I do that on my version of the 3.12 userland:
# btrfs sub list / -o
returns nothing (with no error), which I wasn't quite expecting because
there *are* other snapshots and subvols below '/'
AND
# btrfs sub list / -s
correctly lists the snapshots only.
I don't understand, what or if, I'm doing something wrong.
Thank you in advance.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REQ: btrfs list <subvols only> option
2014-01-09 4:06 ` Alex
@ 2014-01-09 6:27 ` Chris Murphy
2014-01-09 6:44 ` Chris Murphy
2014-01-09 12:20 ` Wang Shilong
1 sibling, 1 reply; 8+ messages in thread
From: Chris Murphy @ 2014-01-09 6:27 UTC (permalink / raw)
To: Alex; +Cc: linux-btrfs
On Jan 8, 2014, at 9:06 PM, Alex <alex@bpmit.com> wrote:
> Chris Murphy <lists <at> colorremedies.com> writes:
>
>> Specify the mount point for the Btrfs file system and it will list all
> subvols on that file system.
>>
>> Chris Murphy--
>
> Thank you Chris.
>
> When I do that on my version of the 3.12 userland:
> # btrfs sub list / -o
> returns nothing (with no error), which I wasn't quite expecting because
> there *are* other snapshots and subvols below '/'
Not if / is a mounted subvolume that itself contains no subvolumes. / is the OS root, it is not the file system subvol=5 root.
Chris Murphy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REQ: btrfs list <subvols only> option
2014-01-09 6:27 ` Chris Murphy
@ 2014-01-09 6:44 ` Chris Murphy
2014-01-09 6:46 ` Chris Murphy
0 siblings, 1 reply; 8+ messages in thread
From: Chris Murphy @ 2014-01-09 6:44 UTC (permalink / raw)
To: Alex; +Cc: Btrfs BTRFS, David Sterba
On Jan 8, 2014, at 11:27 PM, Chris Murphy <lists@colorremedies.com> wrote:
>
> On Jan 8, 2014, at 9:06 PM, Alex <alex@bpmit.com> wrote:
>
>> Chris Murphy <lists <at> colorremedies.com> writes:
>>
>>> Specify the mount point for the Btrfs file system and it will list all
>> subvols on that file system.
>>>
>>> Chris Murphy--
>>
>> Thank you Chris.
>>
>> When I do that on my version of the 3.12 userland:
>> # btrfs sub list / -o
>> returns nothing (with no error), which I wasn't quite expecting because
>> there *are* other snapshots and subvols below '/'
>
> Not if / is a mounted subvolume that itself contains no subvolumes. / is the OS root, it is not the file system subvol=5 root.
Hmm, actually you might have found a bug.
# btrfs subvol list /
ID 272 gen 4276 top level 5 path boot
ID 273 gen 4770 top level 5 path root
ID 274 gen 4680 top level 5 path home
ID 275 gen 265 top level 5 path boot_ro_installed
ID 276 gen 280 top level 5 path root_ro_installed
ID 277 gen 280 top level 5 path home_ro_installed
ID 283 gen 327 top level 5 path boot_ro_installed+updates
ID 284 gen 329 top level 5 path root_ro_installed+updates
ID 285 gen 329 top level 5 path home_ro_installed+updates
ID 286 gen 399 top level 5 path boot_ro.3
ID 287 gen 400 top level 5 path root_ro.3
ID 288 gen 1603 top level 5 path home_ro.3
ID 473 gen 2105 top level 5 path boot_ro.2
ID 474 gen 2106 top level 5 path root_ro.2
ID 475 gen 2107 top level 5 path home_ro.2
ID 476 gen 4136 top level 5 path home/chris/Downloads/git
ID 485 gen 3144 top level 5 path boot_ro.1
ID 486 gen 3145 top level 5 path root_ro.1
ID 487 gen 3146 top level 5 path home_ro.1
ID 488 gen 3880 top level 5 path home/chris/Downloads/git/kernel
# btrfs subvol list / -o
# btrfs subvol list /home -o
# btrfs subvol list /home/chris/Downloads/ -o
# btrfs subvol list /home/chris/Downloads/git -o
It seems for sure that the last three should have reported ID 476 and 488. And probably the first should also have listed 272 and 274.
273 is mounted at /
272 is mounted at /boot
274 is mounted at /home
man btrfs " -o print only subvolumes bellow specified <path>."
Small typo while we're at it, below should have one l.
Chris Murphy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REQ: btrfs list <subvols only> option
2014-01-09 6:44 ` Chris Murphy
@ 2014-01-09 6:46 ` Chris Murphy
2014-01-09 9:25 ` Alex
0 siblings, 1 reply; 8+ messages in thread
From: Chris Murphy @ 2014-01-09 6:46 UTC (permalink / raw)
To: Btrfs BTRFS
On Jan 8, 2014, at 11:44 PM, Chris Murphy <lists@colorremedies.com> wrote:
>
> On Jan 8, 2014, at 11:27 PM, Chris Murphy <lists@colorremedies.com> wrote:
>
>>
>> On Jan 8, 2014, at 9:06 PM, Alex <alex@bpmit.com> wrote:
>>
>>> Chris Murphy <lists <at> colorremedies.com> writes:
>>>
>>>> Specify the mount point for the Btrfs file system and it will list all
>>> subvols on that file system.
>>>>
>>>> Chris Murphy--
>>>
>>> Thank you Chris.
>>>
>>> When I do that on my version of the 3.12 userland:
>>> # btrfs sub list / -o
>>> returns nothing (with no error), which I wasn't quite expecting because
>>> there *are* other snapshots and subvols below '/'
>>
>> Not if / is a mounted subvolume that itself contains no subvolumes. / is the OS root, it is not the file system subvol=5 root.
>
> Hmm, actually you might have found a bug.
>
>
> # btrfs subvol list /
> ID 272 gen 4276 top level 5 path boot
> ID 273 gen 4770 top level 5 path root
> ID 274 gen 4680 top level 5 path home
> ID 275 gen 265 top level 5 path boot_ro_installed
> ID 276 gen 280 top level 5 path root_ro_installed
> ID 277 gen 280 top level 5 path home_ro_installed
> ID 283 gen 327 top level 5 path boot_ro_installed+updates
> ID 284 gen 329 top level 5 path root_ro_installed+updates
> ID 285 gen 329 top level 5 path home_ro_installed+updates
> ID 286 gen 399 top level 5 path boot_ro.3
> ID 287 gen 400 top level 5 path root_ro.3
> ID 288 gen 1603 top level 5 path home_ro.3
> ID 473 gen 2105 top level 5 path boot_ro.2
> ID 474 gen 2106 top level 5 path root_ro.2
> ID 475 gen 2107 top level 5 path home_ro.2
> ID 476 gen 4136 top level 5 path home/chris/Downloads/git
> ID 485 gen 3144 top level 5 path boot_ro.1
> ID 486 gen 3145 top level 5 path root_ro.1
> ID 487 gen 3146 top level 5 path home_ro.1
> ID 488 gen 3880 top level 5 path home/chris/Downloads/git/kernel
>
>
> # btrfs subvol list / -o
> # btrfs subvol list /home -o
> # btrfs subvol list /home/chris/Downloads/ -o
> # btrfs subvol list /home/chris/Downloads/git -o
>
> It seems for sure that the last three should have reported ID 476 and 488. And probably the first should also have listed 272 and 274.
>
> 273 is mounted at /
> 272 is mounted at /boot
> 274 is mounted at /home
>
> man btrfs " -o print only subvolumes bellow specified <path>."
>
> Small typo while we're at it, below should have one l.
kernel-3.13.0-0.rc6.git0.1.fc21.x86_64
btrfs-progs-3.12-1.fc20.x86_64
Chris Murphy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REQ: btrfs list <subvols only> option
2014-01-09 6:46 ` Chris Murphy
@ 2014-01-09 9:25 ` Alex
0 siblings, 0 replies; 8+ messages in thread
From: Alex @ 2014-01-09 9:25 UTC (permalink / raw)
To: linux-btrfs
Chris Murphy <lists <at> colorremedies.com> writes:
> > Hmm, actually you might have found a bug.
> >
> > Small typo while we're at it, below should have one l.
>
> kernel-3.13.0-0.rc6.git0.1.fc21.x86_64
> btrfs-progs-3.12-1.fc20.x86_64
>
> Chris Murphy
>
Thank you muchly!
I'm kinda glad because I didn't really understand your second response in
context. ;-) I would have been stuck had you not updated it!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REQ: btrfs list <subvols only> option
2014-01-09 4:06 ` Alex
2014-01-09 6:27 ` Chris Murphy
@ 2014-01-09 12:20 ` Wang Shilong
1 sibling, 0 replies; 8+ messages in thread
From: Wang Shilong @ 2014-01-09 12:20 UTC (permalink / raw)
To: Alex; +Cc: linux-btrfs
On 01/09/2014 12:06 PM, Alex wrote:
> Chris Murphy <lists <at> colorremedies.com> writes:
>
>> Specify the mount point for the Btrfs file system and it will list all
> subvols on that file system.
>> Chris Murphy--
> Thank you Chris.
>
> When I do that on my version of the 3.12 userland:
> # btrfs sub list / -o
There is a bug for 'btrfs sub list -o path', i will send a patch for this
Thanks,
Wang
> returns nothing (with no error), which I wasn't quite expecting because
> there *are* other snapshots and subvols below '/'
>
> AND
>
> # btrfs sub list / -s
> correctly lists the snapshots only.
>
> I don't understand, what or if, I'm doing something wrong.
> Thank you in advance.
>
>
>
> --
> 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
end of thread, other threads:[~2014-01-09 12:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-09 1:31 REQ: btrfs list <subvols only> option Alex
2014-01-09 1:42 ` Chris Murphy
2014-01-09 4:06 ` Alex
2014-01-09 6:27 ` Chris Murphy
2014-01-09 6:44 ` Chris Murphy
2014-01-09 6:46 ` Chris Murphy
2014-01-09 9:25 ` Alex
2014-01-09 12:20 ` Wang Shilong
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.