Fix vgremove to allow removal of VG with missing PVs.
PATCH 1/1 Fix vgremove to allow removal of VG with missing PVs.
Inroduced by vgremove check function split...
--- WHATS_NEW | 1 + test/t-activate-partial.sh | 3 +++ tools/vgremove.c | 2 +- 3 files changed, 5 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.69 - ================================ + Fix vgremove to allow removal of VG with missing PVs. (2.02.52) Add {pv|vg}_mda_used_count which displays a count of mdas w/ignored bit clear. Add vg_mda_copies which displays the value of --vgmetadatacopies. Describe --vgmetadatacopies in lvm.conf and other man pages.
test/t-activate-partial.sh +3 -0
@@ -15,3 +15,6 @@ lvchange -v --refresh --partial $vg/mirror # also check that vgchange works vgchange -a n --partial $vg vgchange -a y --partial $vg + +# check vgremove +vgremove -f $vg
tools/vgremove.c +1 -1
@@ -49,7 +49,7 @@ static int vgremove_single(struct cmd_context *cmd, const char *vg_name, } } -if (!vg_remove_check (vg)) { +if (!force && !vg_remove_check (vg)) { stack;return ECMD_FAILED ; }
Signature · 1 line
1.7.1
PATCH 1/1 Fix vgremove to allow removal of VG with missing PVs.
Hi,
Quoted 28 lines · Milan Broz
WHATS_NEW +1
-0@@ -1,5 +1,6 @@ Version 2.02.69 - ================================ + Fix vgremove to allow removal of VG with missing PVs. (2.02.52) Add {pv|vg}_mda_used_count which displays a count of mdas w/ignored bit clear. Add vg_mda_copies which displays the value of --vgmetadatacopies. Describe --vgmetadatacopies in lvm.conf and other man pages.test/t-activate-partial.sh +3
-0@@ -15,3 +15,6 @@ lvchange -v --refresh --partial $vg/mirror # also check that vgchange works vgchange -a n --partial $vg vgchange -a y --partial $vg + +# check vgremove +vgremove -f $vgtools/vgremove.c +0
-0
tools/vgremove.c static int vgremove_single(struct cmd_context *cmd, const char *vg_name, · line 55
Quoted 8 lines
tools/vgremove.c +1
-1@@ -49,7 +49,7 @@ static int vgremove_single(struct cmd_context *cmd, const char *vg_name, } } -if (!vg_remove_check (vg)) { +if (!force && !vg_remove_check (vg)) { stack;return ECMD_FAILED ; }
Looks OK as far as I can tell. Maybe just add "not vgremove $vg" just before "vgremove -f $vg" in the test.
Yours,
Petr.
PATCH 1/1 Fix vgremove to allow removal of VG with missing PVs.
Quoted 2 lines · Petr Rockai
Looks OK as far as I can tell. Maybe just add "not vgremove $vg" just before "vgremove -f $vg" in the test.
then it asks interactively because -f is overloaded here to disable lv removal question also:-)
There should be -y added, but it is for another patch probably.
Milan