[linux-lvm] Why snapshots are designed as independent of each other?

Charles Jie chjie at keya.com.tw
Mon Jun 19 06:33:40 UTC 2006


Hi,

(With Mandriva 2006.0 and lvm2-2.01.09-1mdk)

In my recent evaluation, I found that lvm2 snapshots made on the same
original volume will all be updated the same amount of data when we make
change to the original volume.

That means they are made completely independent of each other, only
dependent on the original volume. Such design would cause serious
performance impact if we increase the number of snapshots of a volume
for the purpose of backup.

    e.g. If we create one snapshot every hour and remove the old
    snapshots reaching 24-hour old, we'll keep about 24 snapshots and
    every write to the original volume will make 24 copies to the
    snapshots before the write. It would be a big burden to the use of
    the original volume.

Could anybody tell me why it's designed this way?

* My thinking:

    . A reasonable design should be that a snapshot depends on one
      another according to their creation time. The COW work would
      reduce to mininum, only once for the whole related snapshots set
      based on the same original volume.

    . Deleting any snapshot among the set is still very simple and
      efficient - move its blocks to the next older snapshot (indeed,
      only move those blocks (identified by some ID) not existent in the
      destination snapshot, drop those blocks which exist.)

    . In such design, we don't need to reserve too much space for a big
      number of snapshots - they totally need only about the same space
      as the original volume.

    * Further, conventionally snapshot is called COW, copy-on-write. But
      in my point of view, it's inefficient if it's really implemented
      this way. It takes one read and two writes. With the spirit of
      the virtualization of logical volume management, making one write
      is enough (which is efficient). What we need to do is put the old
      block under the management of the newest snapshot, and make a new
      block (with new content) for the original volume.

I'm newbie to this mailing list. Please feel free to comment, whether
I'm right or wrong. Thanks.

best regards,
charlie

--
===============================================================
Charles Jie (紀春興)               Keya Technologies (開雅科技)
(O1) +886 2 8692 6060 ext 549      Skype: charles.jie
(O2) +886 2 2938 2262              (Mobile) 0968 357 746
===============================================================




More information about the linux-lvm mailing list