From: Zdenek Kabelac Date: Thu, 2 May 2024 11:18:08 +0000 (+0200) Subject: command: correct lvresize X-Git-Tag: v2_03_24~133 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=refs%2Fpipelines%2F1275919999;p=lvm2.git command: correct lvresize Code for supporting size reduction of pool metadata is not yet present so don't pretend the option can work as pushed in previous commit. --- diff --git a/man/lvresize.8_pregen b/man/lvresize.8_pregen index d68cebcdc..622846caa 100644 --- a/man/lvresize.8_pregen +++ b/man/lvresize.8_pregen @@ -59,7 +59,7 @@ lvresize \(em Resize a logical volume .br \fB--noudevsync\fP .br - \fB--poolmetadatasize\fP [\fB+\fP|\fB-\fP]\fISize\fP[m|UNIT] + \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] .br \fB--profile\fP \fIString\fP .br @@ -111,7 +111,7 @@ Resize an LV by a specified size. .br [ \fB-r\fP|\fB--resizefs\fP ] .br -[ \fB--poolmetadatasize\fP [\fB+\fP|\fB-\fP]\fISize\fP[m|UNIT] ] +[ \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] ] .br [ \fB--fs\fP \fIString\fP ] .br @@ -148,7 +148,7 @@ Resize an LV by specified PV extents. Resize a pool metadata SubLV by a specified size. .br .P -\fBlvresize\fP \fB--poolmetadatasize\fP [\fB+\fP|\fB-\fP]\fISize\fP[m|UNIT] \fILV1\fP +\fBlvresize\fP \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] \fILV1\fP .br .RS 4 .ad l @@ -445,7 +445,7 @@ in the background. Only use this if udev is not running or has rules that ignore the devices LVM creates. . .HP -\fB--poolmetadatasize\fP [\fB+\fP|\fB-\fP]\fISize\fP[m|UNIT] +\fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] .br Specifies the new size of the pool metadata LV. The plus prefix \fB+\fP can be used, in which case diff --git a/tools/command.c b/tools/command.c index 7261365e6..cba650b13 100644 --- a/tools/command.c +++ b/tools/command.c @@ -1676,13 +1676,13 @@ static int _update_relative_opt(const char *name, int opt_enum, int val_enum) else if (!strcmp(name, "lvreduce")) switch (opt_enum) { case extents_ARG: return nextents_VAL; - case poolmetadatasize_ARG: case size_ARG: return nsizemb_VAL; } else if (!strcmp(name, "lvresize")) switch (opt_enum) { case extents_ARG: return sextents_VAL; case poolmetadatasize_ARG: + return psizemb_VAL; case size_ARG: return ssizemb_VAL; }