All of lore.kernel.org
 help / color / mirror / Atom feed
* snapshot merging?
@ 2008-09-21 12:22 Tomasz Chmielewski
  2008-09-21 14:19 ` Zheng Yan
  0 siblings, 1 reply; 8+ messages in thread
From: Tomasz Chmielewski @ 2008-09-21 12:22 UTC (permalink / raw)
  To: linux-btrfs

At the beginning of August, Mikulas Patocka posted to linux-kernel 
mailing list about adding snapshot merging to LVM[1].

Basicaly, snapshot merging means that it is possible to turn a snapshot 
back into its origin.

Using LVM, however, means that you need to have free place outside of 
the filesystem (i.e., in physical volume) to make snapshots, which is 
not always possible on workstations and some servers.

Is something similar available, or planned, for btrfs? I didn't find 
anything similar on "btrfs design" page in the wiki.



[1] http://kerneltrap.org/Linux/LVM_Snapshot_Merging


-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: snapshot merging?
  2008-09-21 12:22 snapshot merging? Tomasz Chmielewski
@ 2008-09-21 14:19 ` Zheng Yan
  2008-09-21 14:31   ` Tomasz Chmielewski
  0 siblings, 1 reply; 8+ messages in thread
From: Zheng Yan @ 2008-09-21 14:19 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: linux-btrfs

Tomasz Chmielewski wrote:
> At the beginning of August, Mikulas Patocka posted to linux-kernel
> mailing list about adding snapshot merging to LVM[1].
> 
> Basicaly, snapshot merging means that it is possible to turn a snapshot
> back into its origin.
> 
> Using LVM, however, means that you need to have free place outside of
> the filesystem (i.e., in physical volume) to make snapshots, which is
> not always possible on workstations and some servers.
> 
> Is something similar available, or planned, for btrfs? I didn't find
> anything similar on "btrfs design" page in the wiki.
> 
Writeable snapshot has been available in btrfs for a long time.

> 
> [1] http://kerneltrap.org/Linux/LVM_Snapshot_Merging
> 
Writeable snapshot means you can mount/modify snapshots as you like.
In other words, btrfs does snapshot merging automatically.


Yan Zheng

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: snapshot merging?
  2008-09-21 14:19 ` Zheng Yan
@ 2008-09-21 14:31   ` Tomasz Chmielewski
  2008-09-21 15:00     ` Zheng Yan
  2008-09-24  3:34     ` Daniel Phillips
  0 siblings, 2 replies; 8+ messages in thread
From: Tomasz Chmielewski @ 2008-09-21 14:31 UTC (permalink / raw)
  To: Zheng Yan; +Cc: linux-btrfs

Zheng Yan schrieb:
> Tomasz Chmielewski wrote:
>> At the beginning of August, Mikulas Patocka posted to linux-kernel
>> mailing list about adding snapshot merging to LVM[1].
>>
>> Basicaly, snapshot merging means that it is possible to turn a snapshot
>> back into its origin.
>>
>> Using LVM, however, means that you need to have free place outside of
>> the filesystem (i.e., in physical volume) to make snapshots, which is
>> not always possible on workstations and some servers.
>>
>> Is something similar available, or planned, for btrfs? I didn't find
>> anything similar on "btrfs design" page in the wiki.
>>
> Writeable snapshot has been available in btrfs for a long time.

Writeable snapshots and snapshot merging are two different things.


>> [1] http://kerneltrap.org/Linux/LVM_Snapshot_Merging
>>
> Writeable snapshot means you can mount/modify snapshots as you like.
> In other words, btrfs does snapshot merging automatically.

With LVM, you can also modify snapshots as you like, but it doesn't mean 
LVM supports snapshot merging right now (that is, you have to apply the 
patches described on the page above to have "snapshot merging" feature).


Maybe let me show you an example:

0) you have your "original" root filesystem
1) you make a snapshot of your rootfs
2) you upgrade your distribution (version 1.0 -> version 2.0-alpha)
3) you realise that some of the things don't work as expected - you mark 
that your snapshot should be turned into an original
4) you reboot (as your rootfs is mounted, you have to) and from now on 
your snapshot turns into the original from point 0.


Of course, one could boot off a live CD and copy the snapshot into the 
original, but that involves additional operating system to be booted.

Or, you could copy data from snapshot to the original while your system 
is running, but that could be risky for running programs (you replace 
libc, lots of libraries, binaries etc.).


-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: snapshot merging?
  2008-09-21 14:31   ` Tomasz Chmielewski
@ 2008-09-21 15:00     ` Zheng Yan
  2008-09-24  3:34     ` Daniel Phillips
  1 sibling, 0 replies; 8+ messages in thread
From: Zheng Yan @ 2008-09-21 15:00 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: linux-btrfs

Tomasz Chmielewski wrote:
> Zheng Yan schrieb:
>> Tomasz Chmielewski wrote:
>>> At the beginning of August, Mikulas Patocka posted to linux-kernel
>>> mailing list about adding snapshot merging to LVM[1].
>>>
>>> Basicaly, snapshot merging means that it is possible to turn a snapshot
>>> back into its origin.
>>>
>>> Using LVM, however, means that you need to have free place outside of
>>> the filesystem (i.e., in physical volume) to make snapshots, which is
>>> not always possible on workstations and some servers.
>>>
>>> Is something similar available, or planned, for btrfs? I didn't find
>>> anything similar on "btrfs design" page in the wiki.
>>>
>> Writeable snapshot has been available in btrfs for a long time.
> 
> Writeable snapshots and snapshot merging are two different things.
> 
> 
>>> [1] http://kerneltrap.org/Linux/LVM_Snapshot_Merging
>>>
>> Writeable snapshot means you can mount/modify snapshots as you like.
>> In other words, btrfs does snapshot merging automatically.
> 
> With LVM, you can also modify snapshots as you like, but it doesn't mean
> LVM supports snapshot merging right now (that is, you have to apply the
> patches described on the page above to have "snapshot merging" feature).
> 
> 
> Maybe let me show you an example:
> 
> 0) you have your "original" root filesystem
> 1) you make a snapshot of your rootfs
> 2) you upgrade your distribution (version 1.0 -> version 2.0-alpha)
> 3) you realise that some of the things don't work as expected - you mark
> that your snapshot should be turned into an original
> 4) you reboot (as your rootfs is mounted, you have to) and from now on
> your snapshot turns into the original from point 0.
> 

You can mount the snapshot created in step 1 as your rootfs.
(by changing rootfs mount option in the boot parameter)

Yan Zheng




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: snapshot merging?
  2008-09-21 14:31   ` Tomasz Chmielewski
  2008-09-21 15:00     ` Zheng Yan
@ 2008-09-24  3:34     ` Daniel Phillips
  2008-09-24  8:54       ` Eric Anopolsky
  2008-09-24 12:57       ` Chris Mason
  1 sibling, 2 replies; 8+ messages in thread
From: Daniel Phillips @ 2008-09-24  3:34 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: Zheng Yan, linux-btrfs

On Sunday 21 September 2008 07:31, Tomasz Chmielewski wrote:
> > Writeable snapshot has been available in btrfs for a long time.
> 
> Writeable snapshots and snapshot merging are two different things.

I think what Mikulas really means by "snapshot merging" is what we call
"revert to snapshot" in ddsnap (google Zumastor ddsnap).  The latter is
more appropriate terminology IMHO.  For a snapshotted volume, this just
requires copying any blocks that belong to the snapshot and not the
origin back to the origin.  Similarly, one could revert any snapshot
"back" (quotes because there is not necessarily any relationship in
time) to any other.  For a filesystem it will not be nearly so simple,
because at best only part of the job can be done at the physical block
level.

Regards,

Daniel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: snapshot merging?
  2008-09-24  3:34     ` Daniel Phillips
@ 2008-09-24  8:54       ` Eric Anopolsky
  2008-09-24 10:27         ` Tomasz Torcz
  2008-09-24 12:57       ` Chris Mason
  1 sibling, 1 reply; 8+ messages in thread
From: Eric Anopolsky @ 2008-09-24  8:54 UTC (permalink / raw)
  To: Daniel Phillips; +Cc: Tomasz Chmielewski, Zheng Yan, linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

On Tue, 2008-09-23 at 20:34 -0700, Daniel Phillips wrote:
> On Sunday 21 September 2008 07:31, Tomasz Chmielewski wrote:
> > > Writeable snapshot has been available in btrfs for a long time.
> > 
> > Writeable snapshots and snapshot merging are two different things.
> 
> I think what Mikulas really means by "snapshot merging" is what we call
> "revert to snapshot" in ddsnap (google Zumastor ddsnap).  The latter is
> more appropriate terminology IMHO.  For a snapshotted volume, this just
> requires copying any blocks that belong to the snapshot and not the
> origin back to the origin.  Similarly, one could revert any snapshot
> "back" (quotes because there is not necessarily any relationship in
> time) to any other.  For a filesystem it will not be nearly so simple,
> because at best only part of the job can be done at the physical block
> level.

It took me a while to get what was meant by snapshot merging. Consider
this a vote for the "revert" terminology. :) Although, it calls into
question some of my assumptions about what people use snapshots for.

What do people use snapshots for?

Cheers,
Eric


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: snapshot merging?
  2008-09-24  8:54       ` Eric Anopolsky
@ 2008-09-24 10:27         ` Tomasz Torcz
  0 siblings, 0 replies; 8+ messages in thread
From: Tomasz Torcz @ 2008-09-24 10:27 UTC (permalink / raw)
  To: Eric Anopolsky
  Cc: Daniel Phillips, Tomasz Chmielewski, Zheng Yan, linux-btrfs

Dnia 2008-09-24, =C5=9Bro o godzinie 02:54 -0600, Eric Anopolsky pisze:
> What do people use snapshots for?
 =20
I use snapshots as "quick backup", as addition to full backups done by
Bacula. It much faster and easier to recover previous version of file
from snapshot than from backup software. Revert is not necessary.

 OpenSolaris guys use snapshots for safe system upgrade. With ability t=
o
select rootfs from before upgrade at GRUB screen and boot into older
installation. Revert is crucial in case of wedged upgrade.

--=20
Tomasz Torcz

--
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: snapshot merging?
  2008-09-24  3:34     ` Daniel Phillips
  2008-09-24  8:54       ` Eric Anopolsky
@ 2008-09-24 12:57       ` Chris Mason
  1 sibling, 0 replies; 8+ messages in thread
From: Chris Mason @ 2008-09-24 12:57 UTC (permalink / raw)
  To: Daniel Phillips; +Cc: Tomasz Chmielewski, Zheng Yan, linux-btrfs

On Tue, 2008-09-23 at 20:34 -0700, Daniel Phillips wrote:
> On Sunday 21 September 2008 07:31, Tomasz Chmielewski wrote:
> > > Writeable snapshot has been available in btrfs for a long time.
> > 
> > Writeable snapshots and snapshot merging are two different things.
> 
> I think what Mikulas really means by "snapshot merging" is what we call
> "revert to snapshot" in ddsnap (google Zumastor ddsnap).  The latter is
> more appropriate terminology IMHO.  For a snapshotted volume, this just
> requires copying any blocks that belong to the snapshot and not the
> origin back to the origin.  Similarly, one could revert any snapshot
> "back" (quotes because there is not necessarily any relationship in
> time) to any other.  For a filesystem it will not be nearly so simple,
> because at best only part of the job can be done at the physical block
> level.

In btrfs there's no need to merge.  The original is still there and you
just use it instead of the snapshot.  Both the original and the snapshot
are writable, you can pick whichever one you want to continue forward
with.

Said a different way, the underlying metadata structures and
capabilities of the snapshot and the original are the same.  The only
difference between the two is their starting state.

-chris



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-09-24 12:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-21 12:22 snapshot merging? Tomasz Chmielewski
2008-09-21 14:19 ` Zheng Yan
2008-09-21 14:31   ` Tomasz Chmielewski
2008-09-21 15:00     ` Zheng Yan
2008-09-24  3:34     ` Daniel Phillips
2008-09-24  8:54       ` Eric Anopolsky
2008-09-24 10:27         ` Tomasz Torcz
2008-09-24 12:57       ` Chris Mason

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.