]>
sourceware.org Git - lvm2.git/commit
Skip non-virtual snapshots for availability
Change the behavior of availability change.
With this patch the lvgchange returns success
when VG is properly changed.
It skips non-virtual origins from being changes when
only 'vg' is specified as lvchange -a parameter.
Before this change we had this:
$> lvs -a
LV VG Attr LSize Pool Origin
lvol0 mvg owi-a-s- 128.00k
lvol1 mvg owi-a-s- 128.00k
lvol2 mvg swi-a-s- 1.25m lvol0
lvol3 mvg swi-a-s- 1.25m lvol1
$> lvchange -an mvg ; echo $?
Can't change snapshot logical volume "lvol2".
Can't change snapshot logical volume "lvol3".
5
$> lvs -a
LV VG Attr LSize Pool Origin
lvol0 mvg owi---s- 128.00k
lvol1 mvg owi---s- 128.00k
lvol2 mvg swi---s- 1.25m lvol0
lvol3 mvg swi---s- 1.25m lvol1
$> lvchange -ay mvg ; echo $?
Can't change snapshot logical volume "lvol2".
Can't change snapshot logical volume "lvol3".
5
$> lvs
LV VG Attr LSize Pool Origin
lvol0 mvg owi-a-s- 128.00k
lvol1 mvg owi-a-s- 128.00k
lvol2 mvg swi-a-s- 1.25m lvol0
lvol3 mvg swi-a-s- 1.25m lvol1
After commit:
$> lvs -a
LV VG Attr LSize Pool Origin
lvol0 mvg owi-a-s- 128.00k
lvol1 mvg owi-a-s- 128.00k
lvol2 mvg swi-a-s- 1.25m lvol0
lvol3 mvg swi-a-s- 1.25m lvol1
$> lvchange -an mvg ; echo $?
0
$> lvs -a
LV VG Attr LSize Pool Origin
lvol0 mvg owi---s- 128.00k
lvol1 mvg owi---s- 128.00k
lvol2 mvg swi---s- 1.25m lvol0
lvol3 mvg swi---s- 1.25m lvol1
$> lvchange -ay mvg ; echo $?
0
$> lvs -a
LV VG Attr LSize Pool Origin
lvol0 mvg owi-a-s- 128.00k
lvol1 mvg owi-a-s- 128.00k
lvol2 mvg swi-a-s- 1.25m lvol0
lvol3 mvg swi-a-s- 1.25m lvol1
This page took 0.032872 seconds and 5 git commands to generate.