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 -- 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
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 -- 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
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 -- 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
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 -- 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
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 -- 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
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
Dnia 2008-09-24, śro o godzinie 02:54 -0600, Eric Anopolsky pisze:> What do people use snapshots for?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 to select rootfs from before upgrade at GRUB screen and boot into older installation. Revert is crucial in case of wedged upgrade. -- 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
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 -- 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