* snapshot strange behaviour @ 2011-01-23 7:17 Lubos Kolouch 2011-01-23 12:17 ` Goffredo Baroncelli 0 siblings, 1 reply; 7+ messages in thread From: Lubos Kolouch @ 2011-01-23 7:17 UTC (permalink / raw) To: linux-btrfs Hello, During doing backups I found strange behaviour... 2.6.37, latest btrfs- progs from git nbgentoo ~ # btrfs subv crea a Create subvolume './a' nbgentoo ~ # cd a nbgentoo a # btrfs subv crea b Create subvolume './b' nbgentoo a # touch b/file nbgentoo a # ls -l b/ total 0 -rw-r--r-- 1 root root 0 Jan 23 08:14 file nbgentoo a # cd .. nbgentoo ~ # btrfs subv snap a x Create a snapshot of 'a' in './x' nbgentoo ~ # ls -l x/b/ total 0 and also nbgentoo ~ # cd x/ nbgentoo x # btrfs subv dele b ERROR: 'b' is not a subvolume Is this a bug or intended behaviour and I am missing something something? How to snapshot a subvolume, containing another subvolumes? (I create subvolume backup, under this another subvolumes as not always I want to snapshot the whole backup subvolume). Thank you Lubos ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: snapshot strange behaviour 2011-01-23 7:17 snapshot strange behaviour Lubos Kolouch @ 2011-01-23 12:17 ` Goffredo Baroncelli 2011-01-23 15:05 ` Lubos Kolouch 0 siblings, 1 reply; 7+ messages in thread From: Goffredo Baroncelli @ 2011-01-23 12:17 UTC (permalink / raw) To: Lubos Kolouch; +Cc: linux-btrfs Hi Lubos, On 01/23/2011 08:17 AM, Lubos Kolouch wrote: > Hello, > > During doing backups I found strange behaviour... 2.6.37, latest btrfs- > progs from git > > nbgentoo ~ # btrfs subv crea a > Create subvolume './a' > nbgentoo ~ # cd a > nbgentoo a # btrfs subv crea b > Create subvolume './b' > nbgentoo a # touch b/file > nbgentoo a # ls -l b/ > total 0 > -rw-r--r-- 1 root root 0 Jan 23 08:14 file > nbgentoo a # cd .. > nbgentoo ~ # btrfs subv snap a x > Create a snapshot of 'a' in './x' > nbgentoo ~ # ls -l x/b/ > total 0 > > and also > > nbgentoo ~ # cd x/ > nbgentoo x # btrfs subv dele b > ERROR: 'b' is not a subvolume > > Is this a bug or intended behaviour and I am missing something something? > How to snapshot a subvolume, containing another subvolumes? It is the intended behavior. The snapshotting is not recursive about subvolumes. If you snapshot a subvolume which contains another one, you got only the content of the first subvolume. The directory "x/b" which you see, is not the subvolume "b" snapshotted, but only the "mount-point" of "b". > > (I create subvolume backup, under this another subvolumes as not always I > want to snapshot the whole backup subvolume). > > Thank you > > Lubos > > -- > 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] 7+ messages in thread
* Re: snapshot strange behaviour 2011-01-23 12:17 ` Goffredo Baroncelli @ 2011-01-23 15:05 ` Lubos Kolouch 2011-01-23 18:02 ` Goffredo Baroncelli 0 siblings, 1 reply; 7+ messages in thread From: Lubos Kolouch @ 2011-01-23 15:05 UTC (permalink / raw) To: linux-btrfs Goffredo Baroncelli, Sun, 23 Jan 2011 13:17:13 +0100: > Hi Lubos, > > On 01/23/2011 08:17 AM, Lubos Kolouch wrote: >> Hello, >> >> During doing backups I found strange behaviour... 2.6.37, latest btrfs- >> progs from git >> >> nbgentoo ~ # btrfs subv crea a >> Create subvolume './a' >> nbgentoo ~ # cd a >> nbgentoo a # btrfs subv crea b >> Create subvolume './b' >> nbgentoo a # touch b/file >> nbgentoo a # ls -l b/ >> total 0 >> -rw-r--r-- 1 root root 0 Jan 23 08:14 file nbgentoo a # cd .. >> nbgentoo ~ # btrfs subv snap a x >> Create a snapshot of 'a' in './x' >> nbgentoo ~ # ls -l x/b/ >> total 0 >> >> and also >> >> nbgentoo ~ # cd x/ >> nbgentoo x # btrfs subv dele b >> ERROR: 'b' is not a subvolume >> >> Is this a bug or intended behaviour and I am missing something >> something? How to snapshot a subvolume, containing another subvolumes? > > It is the intended behavior. The snapshotting is not recursive about > subvolumes. If you snapshot a subvolume which contains another one, you > got only the content of the first subvolume. The directory "x/b" which > you see, is not the subvolume "b" snapshotted, but only the > "mount-point" of "b". > Hi Goffredo, I understand. But then I think btrfs should refuse to do it or at least print a warning. Otherwise it is very inconvenient for the user, having to search for any subvolumes down the tree... Lubos ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: snapshot strange behaviour 2011-01-23 15:05 ` Lubos Kolouch @ 2011-01-23 18:02 ` Goffredo Baroncelli 2011-01-23 19:02 ` Chester ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Goffredo Baroncelli @ 2011-01-23 18:02 UTC (permalink / raw) To: Lubos Kolouch; +Cc: linux-btrfs On 01/23/2011 04:05 PM, Lubos Kolouch wrote: > Goffredo Baroncelli, Sun, 23 Jan 2011 13:17:13 +0100: > >> Hi Lubos, >> >> On 01/23/2011 08:17 AM, Lubos Kolouch wrote: >>> Hello, >>> Is this a bug or intended behaviour and I am missing something >>> something? How to snapshot a subvolume, containing another subvolumes? >> >> It is the intended behavior. The snapshotting is not recursive about >> subvolumes. If you snapshot a subvolume which contains another one, you >> got only the content of the first subvolume. The directory "x/b" which >> you see, is not the subvolume "b" snapshotted, but only the >> "mount-point" of "b". >> > > Hi Goffredo, > > I understand. But then I think btrfs should refuse to do it or at least > print a warning. Otherwise it is very inconvenient for the user, having to > search for any subvolumes down the tree... Sorry, but I can't agree. To me it seems a reasonable default. There are a lot of cases where I would not snapshot a sub-sub-subvolume: my rootfs is a subvolume, my home is in another one. I can snapshot, update the root fs, then if something goes wrong I can roolback to the old one, without affecting my home. This behavior is strictly related to the btrfs internal. Any way it is true that this behavior should be highlighted in the documentation. And more, it is possible to add a "-R" flag to snapshot recursively a subvolume... Goffredo > Lubos > > -- > 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] 7+ messages in thread
* Re: snapshot strange behaviour 2011-01-23 18:02 ` Goffredo Baroncelli @ 2011-01-23 19:02 ` Chester 2011-01-23 20:06 ` Lubos Kolouch 2011-01-24 2:01 ` Fajar A. Nugraha 2 siblings, 0 replies; 7+ messages in thread From: Chester @ 2011-01-23 19:02 UTC (permalink / raw) To: linux-btrfs Also, btrfs already has a utility to scan for subvolumes in a directory btrfs subvolume list /path On Sun, Jan 23, 2011 at 12:02 PM, Goffredo Baroncelli <kreijack@libero.it> wrote: > On 01/23/2011 04:05 PM, Lubos Kolouch wrote: >> Goffredo Baroncelli, Sun, 23 Jan 2011 13:17:13 +0100: >> >>> Hi Lubos, >>> >>> On 01/23/2011 08:17 AM, Lubos Kolouch wrote: >>>> Hello, > >>>> Is this a bug or intended behaviour and I am missing something >>>> something? How to snapshot a subvolume, containing another subvolu= mes? >>> >>> It is the intended behavior. The snapshotting is not recursive abou= t >>> subvolumes. If you snapshot a subvolume which contains another one,= you >>> got only the content of the first subvolume. The directory "x/b" wh= ich >>> you see, is not the subvolume "b" snapshotted, but only the >>> "mount-point" of "b". >>> >> >> Hi Goffredo, >> >> I understand. But then I think btrfs should refuse to do it or at le= ast >> print a warning. Otherwise it is very inconvenient for the user, hav= ing to >> search for any subvolumes down the tree... > > > Sorry, but I can't agree. To me it seems a reasonable default. There = are > a lot of cases where I would not snapshot a sub-sub-subvolume: my roo= tfs > is a subvolume, my home is in another one. I can snapshot, update the > root fs, then if something goes wrong I can roolback to the old one, > without affecting my home. > > This behavior is strictly related to the btrfs internal. > > Any way it is true that this behavior should be highlighted in the > documentation. > > And more, it is possible to add a "-R" flag to snapshot recursively a > subvolume... > > Goffredo > >> Lubos >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-btrf= s" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html >> . >> > > -- > 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 =A0http://vger.kernel.org/majordomo-info.html > -- 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] 7+ messages in thread
* Re: snapshot strange behaviour 2011-01-23 18:02 ` Goffredo Baroncelli 2011-01-23 19:02 ` Chester @ 2011-01-23 20:06 ` Lubos Kolouch 2011-01-24 2:01 ` Fajar A. Nugraha 2 siblings, 0 replies; 7+ messages in thread From: Lubos Kolouch @ 2011-01-23 20:06 UTC (permalink / raw) To: linux-btrfs Goffredo Baroncelli, Sun, 23 Jan 2011 19:02:11 +0100: > On 01/23/2011 04:05 PM, Lubos Kolouch wrote: >> Goffredo Baroncelli, Sun, 23 Jan 2011 13:17:13 +0100: >> >>> Hi Lubos, >>> >>> On 01/23/2011 08:17 AM, Lubos Kolouch wrote: >>>> Hello, > >>>> Is this a bug or intended behaviour and I am missing something >>>> something? How to snapshot a subvolume, containing another >>>> subvolumes? >>> >>> It is the intended behavior. The snapshotting is not recursive about >>> subvolumes. If you snapshot a subvolume which contains another one, >>> you got only the content of the first subvolume. The directory "x/b" >>> which you see, is not the subvolume "b" snapshotted, but only the >>> "mount-point" of "b". >>> >>> >> Hi Goffredo, >> >> I understand. But then I think btrfs should refuse to do it or at least >> print a warning. Otherwise it is very inconvenient for the user, having >> to search for any subvolumes down the tree... > > > Sorry, but I can't agree. To me it seems a reasonable default. There are > a lot of cases where I would not snapshot a sub-sub-subvolume: my rootfs > is a subvolume, my home is in another one. I can snapshot, update the > root fs, then if something goes wrong I can roolback to the old one, > without affecting my home. > > This behavior is strictly related to the btrfs internal. > > Any way it is true that this behavior should be highlighted in the > documentation. > > And more, it is possible to add a "-R" flag to snapshot recursively a > subvolume... > > Goffredo The -R would be nice... two use cases : 1) directory many_small_files under the /home subvolume, that you need only for a while - it is easier to for example delete it when it is subvolume as well 2) backups subvolume backups -> subvolumes 20110122, 20110123, ... you want to delete backups older than x years -> it is much faster to do if it is a subvolume as well. But - you may as well want to be able snapshot or delete the whole backups subvolume. Lubos ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: snapshot strange behaviour 2011-01-23 18:02 ` Goffredo Baroncelli 2011-01-23 19:02 ` Chester 2011-01-23 20:06 ` Lubos Kolouch @ 2011-01-24 2:01 ` Fajar A. Nugraha 2 siblings, 0 replies; 7+ messages in thread From: Fajar A. Nugraha @ 2011-01-24 2:01 UTC (permalink / raw) To: linux-btrfs On Mon, Jan 24, 2011 at 1:02 AM, Goffredo Baroncelli <kreijack@libero.it> wrote: > And more, it is possible to add a "-R" flag to snapshot recursively a > subvolume... Are you saying recursive snapshot creation is aready supportted in btrfs? Which version? -- Fajar ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-01-24 2:01 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-01-23 7:17 snapshot strange behaviour Lubos Kolouch 2011-01-23 12:17 ` Goffredo Baroncelli 2011-01-23 15:05 ` Lubos Kolouch 2011-01-23 18:02 ` Goffredo Baroncelli 2011-01-23 19:02 ` Chester 2011-01-23 20:06 ` Lubos Kolouch 2011-01-24 2:01 ` Fajar A. Nugraha
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).