1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/tools
Zdenek Kabelac e8a40f6571 Allow to activate snapshot
Add extra code to active and deactivate related
snapshots and origin when user specifies snapshot
logical volume as lvchange parameter.

Before patch:

$> lvs -a
  LV    VG   Attr     LSize  Pool Origin Snap%  Move Log Copy%  Convert
  lvol0 mvg  owi-a-s-  1.00k
  lvol1 mvg  swi-a-s- 16.00k      lvol0    0.00
  lvol2 mvg  swi-a-s- 16.00k      lvol0    0.00

$> lvchange -an mvg/lvol2; echo $?
  Can't change snapshot logical volume "lvol2".
5

After patch:

$> lvchange -an mvg/lvol2
Change of snapshot lvol2 will also change its origin lvol0 and 1 other
snapshot(s). Proceed? [y/n]: n
  Logical volume lvol2 not changed.

$> lvchange -y -an mvg/lvol2; echo $?
0

$> lvs -a
  LV    VG   Attr     LSize  Pool Origin Snap%  Move Log Copy%  Convert
  lvol0 mvg  owi---s-  1.00k
  lvol1 mvg  swi---s- 16.00k      lvol0
  lvol2 mvg  swi---s- 16.00k      lvol0
2011-11-18 19:22:49 +00:00
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
args.h Thin supports poolmetadatasize setting 2011-11-04 22:43:10 +00:00
cmdnames.h Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
commands.h Thin supports poolmetadatasize setting 2011-11-04 22:43:10 +00:00
dmsetup.c Add --retry option for dmsetup remove to retry removal if not successful. 2011-09-22 17:12:28 +00:00
dumpconfig.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
formats.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvchange.c Allow to activate snapshot 2011-11-18 19:22:49 +00:00
lvconvert.c Add the ability to convert LVs of "mirror" segtype to "raid1" segtype. 2011-10-07 14:56:01 +00:00
lvcreate.c Small comment and indent updates 2011-11-10 12:43:05 +00:00
lvdisplay.c Rework the toollib interface (process_each_*) on top of new vg_read. 2009-07-01 17:00:50 +00:00
lvextend.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvm2cmd-static.c Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
lvm2cmd.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvm2cmd.h Keep the LVM-based dmeventd plugins from trying to manipulate the dmeventd 2011-10-19 08:46:26 +00:00
lvm2cmdline.h Support repetition of --addtag and --deltag arguments. 2010-11-11 17:29:05 +00:00
lvm-static.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvm.c Thin remove unused define 2011-11-12 22:44:10 +00:00
lvmchange.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvmcmdlib.c Keep the LVM-based dmeventd plugins from trying to manipulate the dmeventd 2011-10-19 08:46:26 +00:00
lvmcmdline.c Fix command line option decoding 2011-09-16 12:10:02 +00:00
lvmdiskscan.c Use new dev_open_readonly fn to prevent opening devices for read-write when not necessary. 2011-05-28 09:48:14 +00:00
lvreduce.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvremove.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvrename.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
lvresize.c Thin ensure pool table is update after resize 2011-11-08 12:19:53 +00:00
lvscan.c Do not check for open_count when not needed. 2011-02-03 01:24:46 +00:00
Makefile.in Make dmsetup.static and lvm.static build when dmeventd is disabled. 2011-11-14 21:30:35 +00:00
polldaemon.c Start using 64-bit status flags - most of the code already handles them. 2011-09-06 18:49:31 +00:00
polldaemon.h Start using 64-bit status flags - most of the code already handles them. 2011-09-06 18:49:31 +00:00
pvchange.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
pvck.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
pvcreate.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
pvdisplay.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
pvmove.c Remove test for first_time with FIXME 2011-10-11 08:51:02 +00:00
pvremove.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
pvresize.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
pvscan.c Add new free_pv_fid fn and use it throughout to free all attached fids. 2011-03-11 14:56:56 +00:00
reporter.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
segtypes.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
stub.h Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
toollib.c Skip non-virtual snapshots for availability 2011-11-18 19:19:22 +00:00
toollib.h Const fixing 2011-02-18 14:47:28 +00:00
tools.h Fix possible overflow of size if %FREE or %VG is used. 2011-09-15 15:26:40 +00:00
vgcfgbackup.c Fix process_each_vg / _process_one_vg when vg_read() returns FAILED_LOCKING. 2009-09-15 01:38:59 +00:00
vgcfgrestore.c Const fixing 2011-02-18 14:47:28 +00:00
vgchange.c Thin revert code for exclusive pool activation 2011-11-07 10:58:13 +00:00
vgck.c Make vgck warn about missing PVs. 2010-07-27 20:05:29 +00:00
vgconvert.c Add new free_pv_fid fn and use it throughout to free all attached fids. 2011-03-11 14:56:56 +00:00
vgcreate.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
vgdisplay.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgexport.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgextend.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
vgimport.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgmerge.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
vgmknodes.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgreduce.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
vgremove.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgrename.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
vgscan.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgsplit.c Fix vgsplit when there are mirrors that have mirrored logs. 2011-10-06 14:17:45 +00:00