1LVREDUCE(8)                 System Manager's Manual                LVREDUCE(8)
2
3
4

NAME

6       lvreduce - Reduce the size of a logical volume
7

SYNOPSIS

9       lvreduce option_args position_args
10           [ option_args ]
11

DESCRIPTION

13       lvreduce  reduces  the size of an LV. The freed logical extents are re‐
14       turned to the VG to be used by other LVs. A copy-on-write  snapshot  LV
15       can also be reduced if less space is needed to hold COW blocks. Use lv‐
16       convert(8) to change the number of data images in a  RAID  or  mirrored
17       LV.
18
19       Be careful when reducing an LV's size, because data in the reduced area
20       is lost. Ensure that any file system on the LV is resized  before  run‐
21       ning  lvreduce  so  that the removed extents are not in use by the file
22       system.
23
24       Sizes will be rounded if necessary. For example, the LV size must be an
25       exact  number  of  extents, and the size of a striped segment must be a
26       multiple of the number of stripes.
27
28       In the usage section below, --size Size can be replaced with  --extents
29       Number.  See both descriptions the options section.
30

USAGE

32       lvreduce -L|--size [-]Size[m|UNIT] LV
33           [ -l|--extents [-]Number[PERCENT] ]
34           [ -A|--autobackup y|n ]
35           [ -f|--force ]
36           [ -n|--nofsck ]
37           [ -r|--resizefs ]
38           [    --noudevsync ]
39           [    --reportformat basic|json ]
40           [ COMMON_OPTIONS ]
41
42       Common options for lvm:
43           [ -d|--debug ]
44           [ -h|--help ]
45           [ -q|--quiet ]
46           [ -t|--test ]
47           [ -v|--verbose ]
48           [ -y|--yes ]
49           [    --commandprofile String ]
50           [    --config String ]
51           [    --driverloaded y|n ]
52           [    --lockopt String ]
53           [    --longhelp ]
54           [    --nolocking ]
55           [    --profile String ]
56           [    --version ]
57

OPTIONS

59       -A|--autobackup y|n
60              Specifies if metadata should be backed up automatically after a
61              change.  Enabling this is strongly advised! See vgcfgbackup(8)
62              for more information.
63
64       --commandprofile String
65              The command profile to use for command configuration.  See
66              lvm.conf(5) for more information about profiles.
67
68       --config String
69              Config settings for the command. These override lvm.conf set‐
70              tings.  The String arg uses the same format as lvm.conf, or may
71              use section/field syntax.  See lvm.conf(5) for more information
72              about config.
73
74       -d|--debug ...
75              Set debug level. Repeat from 1 to 6 times to increase the detail
76              of messages sent to the log file and/or syslog (if configured).
77
78       --driverloaded y|n
79              If set to no, the command will not attempt to use device-mapper.
80              For testing and debugging.
81
82       -l|--extents [-]Number[PERCENT]
83              Specifies the new size of the LV in logical extents.  The --size
84              and --extents options are alternate methods of specifying size.
85              The total number of physical extents used will be greater when
86              redundant data is needed for RAID levels.  An alternate syntax
87              allows the size to be determined indirectly as a percentage of
88              the size of a related VG, LV, or set of PVs. The suffix %VG de‐
89              notes the total size of the VG, the suffix %FREE the remaining
90              free space in the VG, and the suffix %PVS the free space in the
91              specified PVs.  For a snapshot, the size can be expressed as a
92              percentage of the total size of the origin LV with the suffix
93              %ORIGIN (100%ORIGIN provides space for the whole origin).  When
94              expressed as a percentage, the size defines an upper limit for
95              the number of logical extents in the new LV. The precise number
96              of logical extents in the new LV is not determined until the
97              command has completed.  When the plus + or minus - prefix is
98              used, the value is not an absolute size, but is relative and
99              added or subtracted from the current size.
100
101       -f|--force ...
102              Override various checks, confirmations and protections.  Use
103              with extreme caution.
104
105       -h|--help
106              Display help text.
107
108       --lockopt String
109              Used to pass options for special cases to lvmlockd.  See lvm‐
110              lockd(8) for more information.
111
112       --longhelp
113              Display long help text.
114
115       -n|--nofsck
116              Do not perform fsck before resizing filesystem when filesystem
117              requires it. You may need to use --force to proceed with this
118              option.
119
120       --nolocking
121              Disable locking.
122
123       --noudevsync
124              Disables udev synchronisation. The process will not wait for no‐
125              tification from udev. It will continue irrespective of any pos‐
126              sible udev processing in the background. Only use this if udev
127              is not running or has rules that ignore the devices LVM creates.
128
129       --profile String
130              An alias for --commandprofile or --metadataprofile, depending on
131              the command.
132
133       -q|--quiet ...
134              Suppress output and log messages. Overrides --debug and --ver‐
135              bose.  Repeat once to also suppress any prompts with answer
136              'no'.
137
138       --reportformat basic|json
139              Overrides current output format for reports which is defined
140              globally by the report/output_format setting in lvm.conf.  basic
141              is the original format with columns and rows.  If there is more
142              than one report per command, each report is prefixed with the
143              report name for identification. json produces report output in
144              JSON format. See lvmreport(7) for more information.
145
146       -r|--resizefs
147              Resize underlying filesystem together with the LV using
148              fsadm(8).
149
150       -L|--size [-]Size[m|UNIT]
151              Specifies the new size of the LV.  The --size and --extents op‐
152              tions are alternate methods of specifying size.  The total num‐
153              ber of physical extents used will be greater when redundant data
154              is needed for RAID levels.  When the plus + or minus - prefix is
155              used, the value is not an absolute size, but is relative and
156              added or subtracted from the current size.
157
158       -t|--test
159              Run in test mode. Commands will not update metadata.  This is
160              implemented by disabling all metadata writing but nevertheless
161              returning success to the calling function. This may lead to un‐
162              usual error messages in multi-stage operations if a tool relies
163              on reading back metadata it believes has changed but hasn't.
164
165       -v|--verbose ...
166              Set verbose level. Repeat from 1 to 4 times to increase the de‐
167              tail of messages sent to stdout and stderr.
168
169       --version
170              Display version information.
171
172       -y|--yes
173              Do not prompt for confirmation interactively but always assume
174              the answer yes. Use with extreme caution.  (For automatic no,
175              see -qq.)
176

VARIABLES

178       LV
179              Logical  Volume  name.  See lvm(8) for valid names.  An LV posi‐
180              tional arg generally includes the VG  name  and  LV  name,  e.g.
181              VG/LV.
182
183       String
184              See the option description for information about the string con‐
185              tent.
186
187       Size[UNIT]
188              Size is an input number that accepts an  optional  unit.   Input
189              units are always treated as base two values, regardless of capi‐
190              talization, e.g. 'k' and 'K' both refer to  1024.   The  default
191              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
192              resents other possible input units:  bBsSkKmMgGtTpPeE.   b|B  is
193              bytes,  s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G
194              is GiB, t|T is TiB, p|P is PiB, e|E is EiB.  (This should not be
195              confused  with the output control --units, where capital letters
196              mean multiple of 1000.)
197

ENVIRONMENT VARIABLES

199       See lvm(8) for information about environment  variables  used  by  lvm.
200       For example, LVM_VG_NAME can generally be substituted for a required VG
201       parameter.
202

EXAMPLES

204       Reduce the size of an LV by 3 logical extents:
205       lvreduce -l -3 vg00/lvol1
206

SEE ALSO

208       lvm(8) lvm.conf(5) lvmconfig(8)
209
210       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
211       pvresize(8) pvs(8) pvscan(8)
212
213       vgcfgbackup(8)  vgcfgrestore(8)  vgchange(8) vgck(8) vgcreate(8) vgcon‐
214       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
215       clone(8)  vgmerge(8)  vgmknodes(8)  vgreduce(8) vgremove(8) vgrename(8)
216       vgs(8) vgscan(8) vgsplit(8)
217
218       lvcreate(8) lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8)  lvre‐
219       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
220
221       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
222       vate(8) lvmdump(8)
223
224       dmeventd(8) lvmpolld(8)  lvmlockd(8)  lvmlockctl(8)  cmirrord(8)  lvmd‐
225       busd(8)
226
227       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
228
229
230
231Red Hat, Inc.          LVM TOOLS 2.03.11(2) (2021-01-08)           LVREDUCE(8)
Impressum