btrfs sub list output

2014-08-04 Thread Hugo Mills
The output options of btrfs sub list seem a bit... arbitrary? awkward? unhelpful? Here's my problem: Given a path at some arbitrary point into a mounted btrfs (sub)volume, find all subvolumes visible under that point, and identify their absolute path names. My test btrfs filesystem looks

Re: strange btrfs sub list output

2011-06-01 Thread C Anthony Risinger
gt;>>>> missing the obvious, though. >>>>>> >>>>>> If I do: >>>>>> >>>>>> btrfs sub create A btrfs sub create A/B btrfs sub snap A >>>>>> A/B/C >>>>>> >>>>>> A,

Re: strange btrfs sub list output

2011-05-31 Thread C Anthony Risinger
gt; >>>>> btrfs sub create A btrfs sub create A/B btrfs sub snap A >>>>> A/B/C >>>>> >>>>> A, A/B, A/B/C have their top-level being 5. How would I get a >>>>> new snapshot to be a child of A/B for instance? >>>>&g

Re: strange btrfs sub list output

2011-05-31 Thread Andreas Philipp
t;> >>>> A, A/B, A/B/C have their top-level being 5. How would I get a >>>> new snapshot to be a child of A/B for instance? >>>> >>>> In my case, 285, was not appearing in the btrfs sub list >>>> output, 287 was a child of 285 with path &qu

Re: strange btrfs sub list output

2011-05-31 Thread C Anthony Risinger
gt; obvious, though. >> > >> > If I do: >> > >> > btrfs sub create A btrfs sub create A/B btrfs sub snap A A/B/C >> > >> > A, A/B, A/B/C have their top-level being 5. How would I get a new >> > snapshot to be a child of A/B for instance? &

Re: strange btrfs sub list output

2011-05-31 Thread Stephane Chazelas
e A btrfs sub create A/B btrfs sub snap A A/B/C > > > > A, A/B, A/B/C have their top-level being 5. How would I get a new > > snapshot to be a child of A/B for instance? > > > > In my case, 285, was not appearing in the btrfs sub list output, > > 287 was a chil

Re: strange btrfs sub list output

2011-05-27 Thread Andreas Philipp
ugh. > > If I do: > > btrfs sub create A btrfs sub create A/B btrfs sub snap A A/B/C > > A, A/B, A/B/C have their top-level being 5. How would I get a new > snapshot to be a child of A/B for instance? > > In my case, 285, was not appearing in the btrfs sub list output,

Re: strange btrfs sub list output

2011-05-27 Thread Hugo Mills
> > If I do: > > btrfs sub create A > btrfs sub create A/B > btrfs sub snap A A/B/C > > A, A/B, A/B/C have their top-level being 5. How would I get a > new snapshot to be a child of A/B for instance? Hm. OK, that's not doing what I thought it was, then. I'l

Re: strange btrfs sub list output

2011-05-27 Thread Stephane Chazelas
that. What I don't get is how one creates a subvol with a top-level other than 5. I might be missing the obvious, though. If I do: btrfs sub create A btrfs sub create A/B btrfs sub snap A A/B/C A, A/B, A/B/C have their top-level being 5. How would I get a new snapshot to be a child of A/B

Re: strange btrfs sub list output

2011-05-27 Thread Hugo Mills
On Fri, May 27, 2011 at 12:06:44PM +0200, Andreas Philipp wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 27.05.2011 11:45, Hugo Mills wrote: > > On Fri, May 27, 2011 at 10:30:29AM +0100, Stephane Chazelas wrote: > >> 2011-05-27 10:12:24 +0100, Hugo Mills: > >> [skipped useful

Re: strange btrfs sub list output

2011-05-27 Thread Andreas Philipp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27.05.2011 11:45, Hugo Mills wrote: > On Fri, May 27, 2011 at 10:30:29AM +0100, Stephane Chazelas wrote: >> 2011-05-27 10:12:24 +0100, Hugo Mills: >> [skipped useful clarification] >>> >>> That's all rather dense, and probably too much information

Re: strange btrfs sub list output

2011-05-27 Thread Hugo Mills
On Fri, May 27, 2011 at 10:30:29AM +0100, Stephane Chazelas wrote: > 2011-05-27 10:12:24 +0100, Hugo Mills: > [skipped useful clarification] > > > >That's all rather dense, and probably too much information. Hope > > it's helpful, though. > [...] > > It is, thanks. > > How would one end up i

Re: strange btrfs sub list output

2011-05-27 Thread Stephane Chazelas
2011-05-27 10:12:24 +0100, Hugo Mills: [skipped useful clarification] > >That's all rather dense, and probably too much information. Hope > it's helpful, though. [...] It is, thanks. How would one end up in a situation where the output of "btrfs sub list ." has: ID 287 top level 285 path da

Re: strange btrfs sub list output

2011-05-27 Thread Andreas Philipp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27.05.2011 11:12, Hugo Mills wrote: > On Fri, May 27, 2011 at 09:47:33AM +0100, Stephane Chazelas wrote: >> 2011-05-27 10:21:03 +0200, Andreas Philipp: >> [...] What do those top-level IDs mean by the way? >>> The top-level ID associated with

Re: strange btrfs sub list output

2011-05-27 Thread Hugo Mills
On Fri, May 27, 2011 at 09:47:33AM +0100, Stephane Chazelas wrote: > 2011-05-27 10:21:03 +0200, Andreas Philipp: > [...] > > > What do those top-level IDs mean by the way? > > The top-level ID associated with a subvolume is NOT the ID of this > > particular subvolume but of the subvolume containing

Re: strange btrfs sub list output

2011-05-27 Thread Stephane Chazelas
Is there a way to derive the subvolume ID from the stat(2) st_dev, by the way. # btrfs sub list . ID 256 top level 5 path a ID 257 top level 5 path b # zstat +dev . a b . 27 a 28 b 29 Are the dev numbers allocated in the same order as the subvolids? Would there be any /sys, /proc, ioctl interface

Re: strange btrfs sub list output

2011-05-27 Thread Stephane Chazelas
2011-05-27 10:21:03 +0200, Andreas Philipp: [...] > > What do those top-level IDs mean by the way? > The top-level ID associated with a subvolume is NOT the ID of this > particular subvolume but of the subvolume containing it. Since the > "root/initial" (sub-)volume has always ID 0, the subvolumes

Re: strange btrfs sub list output

2011-05-27 Thread Andreas Philipp
On 27.05.2011 10:01, Stephane Chazelas wrote: > 2011-05-26 22:22:03 +0100, Stephane Chazelas: [...] >> I get a btrfs sub list output that I don't understand: >> >> # btrfs sub list /backup/ ID 257 top level 5 path >> u1/linux/lvm+btrfs/storage/data/data ID 260

Re: strange btrfs sub list output

2011-05-27 Thread Stephane Chazelas
2011-05-26 22:22:03 +0100, Stephane Chazelas: [...] > I get a btrfs sub list output that I don't understand: > > # btrfs sub list /backup/ > ID 257 top level 5 path u1/linux/lvm+btrfs/storage/data/data > ID 260 top level 5 path u2/linux/lvm/linux/var/data > ID 262 top le

strange btrfs sub list output

2011-05-26 Thread Stephane Chazelas
Hiya, I get a btrfs sub list output that I don't understand: # btrfs sub list /backup/ ID 257 top level 5 path u1/linux/lvm+btrfs/storage/data/data ID 260 top level 5 path u2/linux/lvm/linux/var/data ID 262 top level 5 path u1/linux/lvm+btrfs/storage/data/snapshots/2010-10-11 ID 263 top le