ts-xen-build-prep: don't attempt to extend volume group by 0.
PATCH 1/1 ts-xen-build-prep: don't attempt to extend volume group by 0.
overall_limit_pe can set its argument to 0 if the VG is already as large as it is allowed to be.
In which case we would end up passing "-l +0" to lvextend, which it complains about and then fails.
Move the clamping of $vg_more_free_pe to outside the check for it being 0.
Based on a patch by Robert Ho.
--- ts-xen-build-prep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ts-xen-build-prep +1 -1
@@ -151,9 +151,9 @@ sub lvextend1 ($$$) { $do_limit_pe->(\$vg_more_free_pe, 'unstriped'); + overall_limit_pe(\$vg_more_free_pe); if ($vg_more_free_pe) { logm("$what: unstriped $vg_more_free_pe PEs"); - overall_limit_pe(\$vg_more_free_pe); $more_pe += $vg_more_free_pe; target_cmd_root($ho, "lvextend -i1 -l +$vg_more_free_pe $lv"); }
Signature · 1 line
2.5.1
Ian Campbell writes ("[PATCH OSSTEST] ts-xen-build-prep: don't attempt to extend volume group by 0."):
Quoted 6 lines
overall_limit_pecan set its argument to 0 if the VG is already as large as it is allowed to be.In which case we would end up passing "-l +0" to lvextend, which it complains about and then fails.
Quoted 7 lines
Move the clamping of $vg_more_free_pe to outside the check for it being 0.
Based on a patch by Robert Ho.
Signed-off-by Ian Campbell <[email protected]>Cc Robert Ho <[email protected]>
(again, I think...)