]> sourceware.org Git - lvm2.git/commit
Allow to activate snapshot
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 18 Nov 2011 19:22:49 +0000 (19:22 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 18 Nov 2011 19:22:49 +0000 (19:22 +0000)
commite8a40f65712630fbcc1a0bbcef5a415eb25e8f94
treec0a5305574821bd641fbc152f829cbf241bd7437
parente858ac15467e94ffb2f628fd9bfde7634b555545
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
WHATS_NEW
tools/lvchange.c
This page took 0.027332 seconds and 5 git commands to generate.