master - lvm2app: Add lv snapshot support
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=90467a1412e8c227f83ba7825250e33a4d39607d Commit: 90467a1412e8c227f83ba7825250e33a4d39607d Parent: e8025aa67a05af046878f52dfb45fca30ed70084 Author: Tony Asleson <[email protected]> AuthorDate: Thu Dec 13 17:57:38 2012 -0800 Committer: Andy Grover <[email protected]> CommitterDate: Thu Dec 13 17:58:48 2012 -0800
lvm2app: Add lv snapshot support
Signed-off-by Tony Asleson <[email protected]>
Signed-off-by Andy Grover <[email protected]>
--- liblvm/lvm2app.h | 21 +++++++++++++++++++ liblvm/lvm_lv.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-)
liblvm/lvm2app.h +21 -0
@@ -1379,6 +1379,27 @@ int lvm_lv_rename(lv_t lv, const char *new_name);*/ int lvm_lv_resize (const lv_t lv,uint64_t new_size); +/** +* Create a snapshot of a logical volume +* +* \memberof lv_t +* +* \param lv +* Logical volume handle. +* +* \param snap_name +* Name of the snapshot. +* +* \param max_snap_size +* Max snapshot space to use. If you pass zero the same amount of space as +* the origin will be used. +* +* \return +* Valid lv pointer on success, else NULL on error. +* +*/ +lv_t lvm_lv_snapshot (const lv_t lv,const char *snap_name,uint64_t max_snap_size); +/************************** physical volume handling ************************/ /**
liblvm/lvm_lv.c +55 -2
70 lines not on this page · raw message