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
14       returned 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
16       lvconvert(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
89              denotes 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
125              notification from udev. It will continue irrespective of any
126              possible udev processing in the background. Only use this if
127              udev is not running or has rules that ignore the devices LVM
128              creates.
129
130       --profile String
131              An alias for --commandprofile or --metadataprofile, depending on
132              the command.
133
134       -q|--quiet ...
135              Suppress output and log messages. Overrides --debug and --ver‐
136              bose.  Repeat once to also suppress any prompts with answer
137              'no'.
138
139       --reportformat basic|json
140              Overrides current output format for reports which is defined
141              globally by the report/output_format setting in lvm.conf.  basic
142              is the original format with columns and rows.  If there is more
143              than one report per command, each report is prefixed with the
144              report name for identification. json produces report output in
145              JSON format. See lvmreport(7) for more information.
146
147       -r|--resizefs
148              Resize underlying filesystem together with the LV using
149              fsadm(8).
150
151       -L|--size [-]Size[m|UNIT]
152              Specifies the new size of the LV.  The --size and --extents
153              options are alternate methods of specifying size.  The total
154              number of physical extents used will be greater when redundant
155              data is needed for RAID levels.  When the plus + or minus - pre‐
156              fix is used, the value is not an absolute size, but is relative
157              and added or subtracted from the current size.
158
159       -t|--test
160              Run in test mode. Commands will not update metadata.  This is
161              implemented by disabling all metadata writing but nevertheless
162              returning success to the calling function. This may lead to
163              unusual error messages in multi-stage operations if a tool
164              relies on reading back metadata it believes has changed but
165              hasn't.
166
167       -v|--verbose ...
168              Set verbose level. Repeat from 1 to 4 times to increase the
169              detail of messages sent to stdout and stderr.
170
171       --version
172              Display version information.
173
174       -y|--yes
175              Do not prompt for confirmation interactively but always assume
176              the answer yes. Use with extreme caution.  (For automatic no,
177              see -qq.)
178

VARIABLES

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

ENVIRONMENT VARIABLES

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

EXAMPLES

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

SEE ALSO

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