[lvm-devel] Allow read-only snapshots to be created using liblvm2app
David Taylor
davidt-lvm2 at yadt.co.uk
Fri Dec 26 19:06:32 UTC 2014
Hi,
I've recently been attempting to use the lvm Python module to script
creation of snapshots for backup purposes. I'd prefer these to be
read-only snapshots, but the current API doesn't appear to allow this,
either using the Python module or using liblvm2app directly.
I've managed to bodge support for read-only snapshots locally using
the following patches. I have a couple of reservations about my
approach, but thought I'd send them anyway in the hope of provoking
a better patch!
- By adding a new parameter to the existing lvm_lv_snapshot this
would break any existing users of liblvm2app, but there appear
to have been other breaking changes in the recent past.
- A more flexible way to set params for LVs (etc.) would probably
be more useful, but as this works for my purposes at least,
I decided to KISS.
David Taylor(2):
Add readonly parameter to liblvm2app lvm_lv_snapshot()
Expose readonly parameter of lvm_lv_snapshot() to python bindings.
liblvm/lvm2app.h | 11 +++++++++--
liblvm/lvm_lv.c | 17 ++++++++++++-----
python/liblvm.c | 6 ++++--
3 files changed, 25 insertions(+), 9 deletions(-)
--
David Taylor
More information about the lvm-devel
mailing list