[lvm-devel] master - python-lvm: Make second lv.snapshot() argument optional

Zdenek Kabelac zkabelac at redhat.com
Sat Dec 15 21:34:47 UTC 2012


Dne 14.12.2012 23:11, Andy Grover napsal(a):
> Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0958905b1bc0a59d34a4092377bae7c59f424181
> Commit:        0958905b1bc0a59d34a4092377bae7c59f424181
> Parent:        0e3093979e901384aecb22e08d83b5acb2ef12c1
> Author:        Andy Grover <agrover at redhat.com>
> AuthorDate:    Fri Dec 14 14:10:41 2012 -0800
> Committer:     Andy Grover <agrover at redhat.com>
> CommitterDate: Fri Dec 14 14:10:41 2012 -0800
>
> python-lvm: Make second lv.snapshot() argument optional
>
> If no size is given, size defaults to 0, which in lvm_lv_snapshot will
> allocate extents equal to the original LV be allocated for the new
> snapshot.
>


Possibly not the ideal solution here.

1) we have some clash with command line 'API'
    user creates snapshot of thin volume
       - without giving size he get thin volume snaphost.
         lvcreate -s
       - with size specified he gets 'old' snapshot
         (snapshot outside of the pool)
         lvcreate -s -l|-L

2) using same size of origin is not enough to cover
    i.e. full rewrite of origin device - you need some
    'extra' size to store snapshot's metadata (remapping blocks)

Zdenek




More information about the lvm-devel mailing list