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           [    --profile String ]
55           [    --version ]
56

OPTIONS

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

VARIABLES

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

ENVIRONMENT VARIABLES

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

EXAMPLES

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

SEE ALSO

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