* lvcreate -s - why specifying size for snapshot ? @ 2009-03-20 15:47 Sandeep K Sinha 2009-03-20 16:10 ` Bryn M. Reeves 2009-03-20 16:15 ` Dave Wysochanski 0 siblings, 2 replies; 10+ messages in thread From: Sandeep K Sinha @ 2009-03-20 15:47 UTC (permalink / raw) To: lvm-devel Hi all, Disk After hunting for relevant documents and failing to find one. I would like to know if its not true that the size of the snapshot should be equal to the original volume? If so, then why do we accept size for a snapshot? Or Am I missing something somewhere else? -- Regards, Sandeep. ?To learn is to change. Education is a process that changes the learner.? ^ permalink raw reply [flat|nested] 10+ messages in thread
* lvcreate -s - why specifying size for snapshot ? 2009-03-20 15:47 lvcreate -s - why specifying size for snapshot ? Sandeep K Sinha @ 2009-03-20 16:10 ` Bryn M. Reeves 2009-03-20 16:18 ` Jonathan Brassow 2009-03-20 16:15 ` Dave Wysochanski 1 sibling, 1 reply; 10+ messages in thread From: Bryn M. Reeves @ 2009-03-20 16:10 UTC (permalink / raw) To: lvm-devel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sandeep K Sinha wrote: > Hi all, > Disk > After hunting for relevant documents and failing to find one. > I would like to know if its not true that the size of the snapshot > should be equal to the original volume? > If so, then why do we accept size for a snapshot? > > Or Am I missing something somewhere else? > The size of the snapshot governs the amount of space set aside for storing the changes to the origin volume. E.g. if you made a snapshot and then completely overwrote the origin the snapshot would have to be at least as big as the origin volume to hold the changes. You need to dimension a snapshot according to the expected level of change. So for example a short-lived snapshot of a read-mostly volume, e.g. /usr, would need less space than a long-lived snapshot of a volume that sees a greater number of writes such as /home. Snapshots can be grown after they have been created but you need to make sure they don't fill up. If this happens the snapshot will become invalid (since it can no longer faithfully track changes on the origin volume). Regards, Bryn. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAknDv98ACgkQ6YSQoMYUY95s2wCfQwnpoTiHL+8xhuifVX4YGoJz TW0Ani+qq0uDmwgAKbHAVUiwEO6MLGtN =D2F3 -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 10+ messages in thread
* lvcreate -s - why specifying size for snapshot ? 2009-03-20 16:10 ` Bryn M. Reeves @ 2009-03-20 16:18 ` Jonathan Brassow 2009-03-20 16:40 ` Sandeep K Sinha 0 siblings, 1 reply; 10+ messages in thread From: Jonathan Brassow @ 2009-03-20 16:18 UTC (permalink / raw) To: lvm-devel On Mar 20, 2009, at 11:10 AM, Bryn M. Reeves wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Sandeep K Sinha wrote: >> Hi all, >> Disk >> After hunting for relevant documents and failing to find one. >> I would like to know if its not true that the size of the snapshot >> should be equal to the original volume? >> If so, then why do we accept size for a snapshot? >> >> Or Am I missing something somewhere else? >> > > The size of the snapshot governs the amount of space set aside for > storing the changes to the origin volume. E.g. if you made a snapshot > and then completely overwrote the origin the snapshot would have to be > at least as big as the origin volume to hold the changes. > > You need to dimension a snapshot according to the expected level of > change. So for example a short-lived snapshot of a read-mostly volume, > e.g. /usr, would need less space than a long-lived snapshot of a > volume > that sees a greater number of writes such as /home. > > Snapshots can be grown after they have been created but you need to > make > sure they don't fill up. If this happens the snapshot will become > invalid (since it can no longer faithfully track changes on the origin > volume). Nice explanation! This should be placed in the LVM manual. I will notify the appropriate authorities. :) brassow ^ permalink raw reply [flat|nested] 10+ messages in thread
* lvcreate -s - why specifying size for snapshot ? 2009-03-20 16:18 ` Jonathan Brassow @ 2009-03-20 16:40 ` Sandeep K Sinha 2009-03-20 17:07 ` Bryn M. Reeves 2009-03-20 17:12 ` Jonathan Brassow 0 siblings, 2 replies; 10+ messages in thread From: Sandeep K Sinha @ 2009-03-20 16:40 UTC (permalink / raw) To: lvm-devel On Fri, Mar 20, 2009 at 9:48 PM, Jonathan Brassow <jbrassow@redhat.com> wrote: > > On Mar 20, 2009, at 11:10 AM, Bryn M. Reeves wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Sandeep K Sinha wrote: >>> >>> Hi all, >>> Disk >>> After hunting for relevant documents and failing to find one. >>> I would like to know if its not true that the size of the snapshot >>> should be equal to the original volume? >>> If so, then why do we accept size for a snapshot? >>> >>> Or Am I missing something somewhere else? >>> >> >> The size of the snapshot governs the amount of space set aside for >> storing the changes to the origin volume. E.g. if you made a snapshot >> and then completely overwrote the origin the snapshot would have to be >> at least as big as the origin volume to hold the changes. >> Agreed to all the explainations, but then I would like to know why am I able to succeed in creating a snapshot > original volume. LVM should puke an error for it right. Or is our snapshot like a CDP? I dont thinks so. IMO, extending lvm to have a block level CDP as a target should be a good option. >> You need to dimension a snapshot according to the expected level of >> change. So for example a short-lived snapshot of a read-mostly volume, >> e.g. /usr, would need less space than a long-lived snapshot of a volume >> that sees a greater number of writes such as /home. >> >> Snapshots can be grown after they have been created but you need to make >> sure they don't fill up. If this happens the snapshot will become >> invalid (since it can no longer faithfully track changes on the origin >> volume). > > Nice explanation! ?This should be placed in the LVM manual. ?I will notify > the appropriate authorities. ?:) > > ?brassow > > -- > lvm-devel mailing list > lvm-devel at redhat.com > https://www.redhat.com/mailman/listinfo/lvm-devel > -- Regards, Sandeep. ?To learn is to change. Education is a process that changes the learner.? ^ permalink raw reply [flat|nested] 10+ messages in thread
* lvcreate -s - why specifying size for snapshot ? 2009-03-20 16:40 ` Sandeep K Sinha @ 2009-03-20 17:07 ` Bryn M. Reeves 2009-03-20 17:33 ` Bryn M. Reeves 2009-03-20 17:38 ` Sandeep K Sinha 2009-03-20 17:12 ` Jonathan Brassow 1 sibling, 2 replies; 10+ messages in thread From: Bryn M. Reeves @ 2009-03-20 17:07 UTC (permalink / raw) To: lvm-devel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sandeep K Sinha wrote: > On Fri, Mar 20, 2009 at 9:48 PM, Jonathan Brassow <jbrassow@redhat.com> wrote: >> On Mar 20, 2009, at 11:10 AM, Bryn M. Reeves wrote: >> >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> Sandeep K Sinha wrote: >>>> Hi all, >>>> Disk >>>> After hunting for relevant documents and failing to find one. >>>> I would like to know if its not true that the size of the snapshot >>>> should be equal to the original volume? >>>> If so, then why do we accept size for a snapshot? >>>> >>>> Or Am I missing something somewhere else? >>>> >>> The size of the snapshot governs the amount of space set aside for >>> storing the changes to the origin volume. E.g. if you made a snapshot >>> and then completely overwrote the origin the snapshot would have to be >>> at least as big as the origin volume to hold the changes. >>> > Agreed to all the explainations, but then I would like to know why am > I able to succeed in creating a snapshot > original volume. > LVM should puke an error for it right. Not at all - going back to the original example: suppose you created a snapshot and then completely overwrite the origin volume *twice*. Now the snapshot must be twice the size of the origin - one to hold the data that was originally on the origin and one to hold the data from the first overwrite. There is no real or apparent relationship between the size of the origin and the size of the snapshot: it only has to do with the quantity of change you need to record. > Or is our snapshot like a CDP? I dont thinks so. Continuous data protection? A snapshot is very similar to CDP but it is just tracking the state of the origin at one point in time (the time at which it was created). You don't have the ability to roll back to arbitrary intermediate states but the state of all blocks on the device (snapshot chunks) at the time the snapshot was created is tracked so long as there is enough space in the exception store. > IMO, extending lvm to have a block level CDP as a target should be a > good option. The replicator target addresses some of the use-cases for CDP and aims to provide write-order fidelity for the replicated copies. See the project pages here: http://people.redhat.com/heinzm/sw/dm/dm-replicator/ Regards, Bryn. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAknDzT0ACgkQ6YSQoMYUY94P4wCgt8Efxd+ebZGEfHTkEZVDd7Qk mRoAoLbDvatbIMZpZlAb2XehkerQadwE =n+/Y -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 10+ messages in thread
* lvcreate -s - why specifying size for snapshot ? 2009-03-20 17:07 ` Bryn M. Reeves @ 2009-03-20 17:33 ` Bryn M. Reeves 2009-03-20 17:38 ` Sandeep K Sinha 1 sibling, 0 replies; 10+ messages in thread From: Bryn M. Reeves @ 2009-03-20 17:33 UTC (permalink / raw) To: lvm-devel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bryn M. Reeves wrote: > Sandeep K Sinha wrote: >> On Fri, Mar 20, 2009 at 9:48 PM, Jonathan Brassow <jbrassow@redhat.com> wrote: >>> On Mar 20, 2009, at 11:10 AM, Bryn M. Reeves wrote: >>> >>>> -----BEGIN PGP SIGNED MESSAGE----- >>>> Hash: SHA1 >>>> >>>> Sandeep K Sinha wrote: >>>>> Hi all, >>>>> Disk >>>>> After hunting for relevant documents and failing to find one. >>>>> I would like to know if its not true that the size of the snapshot >>>>> should be equal to the original volume? >>>>> If so, then why do we accept size for a snapshot? >>>>> >>>>> Or Am I missing something somewhere else? >>>>> >>>> The size of the snapshot governs the amount of space set aside for >>>> storing the changes to the origin volume. E.g. if you made a snapshot >>>> and then completely overwrote the origin the snapshot would have to be >>>> at least as big as the origin volume to hold the changes. >>>> >> Agreed to all the explainations, but then I would like to know why am >> I able to succeed in creating a snapshot > original volume. >> LVM should puke an error for it right. > > Not at all - going back to the original example: suppose you created a > snapshot and then completely overwrite the origin volume *twice*. Now > the snapshot must be twice the size of the origin - one to hold the data > that was originally on the origin and one to hold the data from the > first overwrite. Err, scratch that. LVM's snapshots don't behave like this (never did! :). Not enough coffee.. Bryn. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAknD0qIACgkQ6YSQoMYUY96OXwCeLcXJyXcYBN6IfVB8GloF2rtE PusAoLYCSrxJ1u1OMaQuN+Va2drps/f2 =uxLF -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 10+ messages in thread
* lvcreate -s - why specifying size for snapshot ? 2009-03-20 17:07 ` Bryn M. Reeves 2009-03-20 17:33 ` Bryn M. Reeves @ 2009-03-20 17:38 ` Sandeep K Sinha 2009-03-20 17:37 ` Bryn M. Reeves 1 sibling, 1 reply; 10+ messages in thread From: Sandeep K Sinha @ 2009-03-20 17:38 UTC (permalink / raw) To: lvm-devel On Fri, Mar 20, 2009 at 10:37 PM, Bryn M. Reeves <bmr@redhat.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Sandeep K Sinha wrote: >> On Fri, Mar 20, 2009 at 9:48 PM, Jonathan Brassow <jbrassow@redhat.com> wrote: >>> On Mar 20, 2009, at 11:10 AM, Bryn M. Reeves wrote: >>> >>>> -----BEGIN PGP SIGNED MESSAGE----- >>>> Hash: SHA1 >>>> >>>> Sandeep K Sinha wrote: >>>>> Hi all, >>>>> Disk >>>>> After hunting for relevant documents and failing to find one. >>>>> I would like to know if its not true that the size of the snapshot >>>>> should be equal to the original volume? >>>>> If so, then why do we accept size for a snapshot? >>>>> >>>>> Or Am I missing something somewhere else? >>>>> >>>> The size of the snapshot governs the amount of space set aside for >>>> storing the changes to the origin volume. E.g. if you made a snapshot >>>> and then completely overwrote the origin the snapshot would have to be >>>> at least as big as the origin volume to hold the changes. >>>> >> Agreed to all the explainations, but then I would like to know why am >> I able to succeed in creating a snapshot > original volume. >> LVM should puke an error for it right. > > Not at all - going back to the original example: suppose you created a > snapshot and then completely overwrite the origin volume *twice*. Now > the snapshot must be twice the size of the origin - one to hold the data > that was originally on the origin and one to hold the data from the > first overwrite. > I am getting slightly confused here, do you mean to say that we keep incremental backup of the original LV blocks in the snapshots. Now if we take it for all the changes and we cannot revert back to any point in time, then what is the use of having incremental backup of all the blocks. What jonathan said, that if you maintain several point in time snapshot in the same cow device then that makes sense to me that atleast we would be able to revert back to those point in time states. > There is no real or apparent relationship between the size of the origin > and the size of the snapshot: it only has to do with the quantity of > change you need to record. > >> Or is our snapshot like a CDP? I dont thinks so. > > Continuous data protection? A snapshot is very similar to CDP but it is > just tracking the state of the origin at one point in time (the time at > which it was created). You don't have the ability to roll back to > arbitrary intermediate states but the state of all blocks on the device > (snapshot chunks) at the time the snapshot was created is tracked so > long as there is enough space in the exception store. > >> IMO, extending lvm to have a block level CDP as a target should be a >> good option. > > The replicator target addresses some of the use-cases for CDP and aims > to provide write-order fidelity for the replicated copies. See the > project pages here: > > http://people.redhat.com/heinzm/sw/dm/dm-replicator/ > Thanks for the info. > Regards, > Bryn. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iEYEARECAAYFAknDzT0ACgkQ6YSQoMYUY94P4wCgt8Efxd+ebZGEfHTkEZVDd7Qk > mRoAoLbDvatbIMZpZlAb2XehkerQadwE > =n+/Y > -----END PGP SIGNATURE----- > > -- > lvm-devel mailing list > lvm-devel at redhat.com > https://www.redhat.com/mailman/listinfo/lvm-devel > -- Regards, Sandeep. ?To learn is to change. Education is a process that changes the learner.? ^ permalink raw reply [flat|nested] 10+ messages in thread
* lvcreate -s - why specifying size for snapshot ? 2009-03-20 17:38 ` Sandeep K Sinha @ 2009-03-20 17:37 ` Bryn M. Reeves 0 siblings, 0 replies; 10+ messages in thread From: Bryn M. Reeves @ 2009-03-20 17:37 UTC (permalink / raw) To: lvm-devel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sandeep K Sinha wrote: > On Fri, Mar 20, 2009 at 10:37 PM, Bryn M. Reeves <bmr@redhat.com> wrote: > Sandeep K Sinha wrote: >>>> On Fri, Mar 20, 2009 at 9:48 PM, Jonathan Brassow <jbrassow@redhat.com> wrote: >>>>> On Mar 20, 2009, at 11:10 AM, Bryn M. Reeves wrote: >>>>> >>>>>> -----BEGIN PGP SIGNED MESSAGE----- >>>>>> Hash: SHA1 >>>>>> >>>>>> Sandeep K Sinha wrote: >>>>>>> Hi all, >>>>>>> Disk >>>>>>> After hunting for relevant documents and failing to find one. >>>>>>> I would like to know if its not true that the size of the snapshot >>>>>>> should be equal to the original volume? >>>>>>> If so, then why do we accept size for a snapshot? >>>>>>> >>>>>>> Or Am I missing something somewhere else? >>>>>>> >>>>>> The size of the snapshot governs the amount of space set aside for >>>>>> storing the changes to the origin volume. E.g. if you made a snapshot >>>>>> and then completely overwrote the origin the snapshot would have to be >>>>>> at least as big as the origin volume to hold the changes. >>>>>> >>>> Agreed to all the explainations, but then I would like to know why am >>>> I able to succeed in creating a snapshot > original volume. >>>> LVM should puke an error for it right. > Not at all - going back to the original example: suppose you created a > snapshot and then completely overwrite the origin volume *twice*. Now > the snapshot must be twice the size of the origin - one to hold the data > that was originally on the origin and one to hold the data from the > first overwrite. > > >> I am getting slightly confused here, >> do you mean to say that we keep incremental backup of the original LV >> blocks in the snapshots. No, ignore that. I was being dumb. >> What jonathan said, that if you maintain several point in time >> snapshot in the same cow device then that makes sense to me that >> atleast we would be able to revert back to those point in time states. Right. Cheers, Bryn. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAknD1FAACgkQ6YSQoMYUY97migCgv18SSfqZ4fnF9Y6YmglwOfC5 8xYAoLkowBhDEHa16NrZhsCBJw/QZWfD =iqC5 -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 10+ messages in thread
* lvcreate -s - why specifying size for snapshot ? 2009-03-20 16:40 ` Sandeep K Sinha 2009-03-20 17:07 ` Bryn M. Reeves @ 2009-03-20 17:12 ` Jonathan Brassow 1 sibling, 0 replies; 10+ messages in thread From: Jonathan Brassow @ 2009-03-20 17:12 UTC (permalink / raw) To: lvm-devel On Mar 20, 2009, at 11:40 AM, Sandeep K Sinha wrote: > On Fri, Mar 20, 2009 at 9:48 PM, Jonathan Brassow > <jbrassow@redhat.com> wrote: >> >> On Mar 20, 2009, at 11:10 AM, Bryn M. Reeves wrote: >> >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> Sandeep K Sinha wrote: >>>> >>>> Hi all, >>>> Disk >>>> After hunting for relevant documents and failing to find one. >>>> I would like to know if its not true that the size of the snapshot >>>> should be equal to the original volume? >>>> If so, then why do we accept size for a snapshot? >>>> >>>> Or Am I missing something somewhere else? >>>> >>> >>> The size of the snapshot governs the amount of space set aside for >>> storing the changes to the origin volume. E.g. if you made a >>> snapshot >>> and then completely overwrote the origin the snapshot would have >>> to be >>> at least as big as the origin volume to hold the changes. >>> > Agreed to all the explainations, but then I would like to know why am > I able to succeed in creating a snapshot > original volume. > LVM should puke an error for it right. You need to keep in mind that there will be some metadata associated with tracking blocks in the snapshot, so if you overwrote the entire origin, you would need 'snapshot > origin'. Also, in the near future, multiple snapshots may share the same COW device... in which case you very well may need to create a 'snapshot > origin'. Leaving out the subtleties, the first explanation is the best. > Or is our snapshot like a CDP? I dont thinks so. Snapshots might be a part of an overall CDP (continuous data protection) system, but not a CDP by itself. brassow ^ permalink raw reply [flat|nested] 10+ messages in thread
* lvcreate -s - why specifying size for snapshot ? 2009-03-20 15:47 lvcreate -s - why specifying size for snapshot ? Sandeep K Sinha 2009-03-20 16:10 ` Bryn M. Reeves @ 2009-03-20 16:15 ` Dave Wysochanski 1 sibling, 0 replies; 10+ messages in thread From: Dave Wysochanski @ 2009-03-20 16:15 UTC (permalink / raw) To: lvm-devel On Fri, 2009-03-20 at 21:17 +0530, Sandeep K Sinha wrote: > Hi all, > Disk > After hunting for relevant documents and failing to find one. > I would like to know if its not true that the size of the snapshot > should be equal to the original volume? > If so, then why do we accept size for a snapshot? > > Or Am I missing something somewhere else? > The size for the snapshot is the exception store - basically the blocks that get modified need some place to be stored. This is why you need a separate size for snapshot LV which may be very different (usually much smaller) than the original LV. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-03-20 17:38 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-03-20 15:47 lvcreate -s - why specifying size for snapshot ? Sandeep K Sinha 2009-03-20 16:10 ` Bryn M. Reeves 2009-03-20 16:18 ` Jonathan Brassow 2009-03-20 16:40 ` Sandeep K Sinha 2009-03-20 17:07 ` Bryn M. Reeves 2009-03-20 17:33 ` Bryn M. Reeves 2009-03-20 17:38 ` Sandeep K Sinha 2009-03-20 17:37 ` Bryn M. Reeves 2009-03-20 17:12 ` Jonathan Brassow 2009-03-20 16:15 ` Dave Wysochanski
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.