lee <l...@yagibdah.de> wrote:

> Rich Freeman <ri...@gentoo.org> writes:
> 
> > On Tue, Jan 19, 2016 at 5:22 PM, lee <l...@yagibdah.de> wrote:
> >> "J. Roeleveld" <jo...@antarean.org> writes:
> >>
> >> How does that work?  IIUC, when you created a snapshot, any changes you
> >> make to the snapshotted (or how that is called) file system are being
> >> referenced by the snapshot which you can either destroy or abandon.
> >> When you destroy it, the changes you made are being applied to the
> >> file system you snapshotted (because someone decided to use a very
> >> misleading terminology), and when you abandon it, the changes are thrown
> >> away and you end up with the file system as it was before the snapshot
> >> was created.
> >>
> >> In any case, you do not get multiple versions (which only reference the
> >> changes made) of the file system you snapshotted but only one current
> >> version.
> >>
> >> Do you need to use a special file system or something which provides
> >> this kind of multiple copies when you make snapshots?
> >>
> >
> > And that is exactly what zfs and btrfs provide. Snapshots are full
> > citizens.  If I create a snapshot of a directory in btrfs it is
> > essentially indistinguishable from running cp -a on the directory,
> > except the snapshot takes only seconds to create almost entirely
> > regardless of size, and takes almost no space until changes are made.
> > Later I can delete the snapshot, or delete the original, or keep both
> > indefinitely making changes to either.
> 
> Hm, I must be misunderstanding snapshots entirely.
> 
> What happens when you remove a snapshot after you modified the
> "original" /and/ the snapshot?  You destroy at least one of them, so you
> can never get rid of the snapshot in a non-destructive way?
> 
> My understanding is that when you make a snapshot, you get a copy that
> doesn't change which you can somehow use to make backups.  When the
> backup is finished, you can remove the snapshot, and the changes that
> were made in the meantime are not lost --- unless you decide to throw
> them away when removing the snapshot, in which case you get a rollback.
> 
> To make things more complicated, I've seen zfs refusing to remove a
> snapshot and saying that something is recursive (IIRC), and it didn't
> make any sense anymore.  So I left everything as it was because I didn't
> want to loose data, and a while later, I removed this very same snapshot
> without getting issues as before.  Weird behaviour makes snapshots
> rather scary, so I avoid them now.
> 
> There seems to be some sort of relationship between a snapshot and the
> "original" which limits what you can do with a snapshot, like the
> snapshot is somehow attached to the "original".  At least that makes
> some sense to me because no real copy is created when you make a
> snapshot.  But how do you detach a snapshot from the "original" so that
> you could savely modify both?

In zfs you can clone the snapshot and it will be independent, but I am
new at zfs, so check it out.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         cov...@ccs.covici.com

Reply via email to