1VGREDUCE(8) System Manager's Manual VGREDUCE(8)
2
3
4
6 vgreduce — Remove physical volume(s) from a volume group
7
9 vgreduce option_args position_args
10 [ option_args ]
11
12 -a|--all
13 -A|--autobackup y|n
14 --commandprofile String
15 --config String
16 -d|--debug
17 --devices PV
18 --devicesfile String
19 --driverloaded y|n
20 -f|--force
21 -h|--help
22 --journal String
23 --lockopt String
24 --longhelp
25 --mirrorsonly
26 --nohints
27 --nolocking
28 --profile String
29 -q|--quiet
30 --removemissing
31 --reportformat basic|json|json_std
32 -t|--test
33 -v|--verbose
34 --version
35 -y|--yes
36
38 vgreduce removes one or more unused PVs from a VG.
39
41 Remove a PV from a VG.
42
43 vgreduce VG PV ...
44 [ COMMON_OPTIONS ]
45
46 —
47
48 Remove all unused PVs from a VG.
49
50 vgreduce -a|--all VG
51 [ COMMON_OPTIONS ]
52
53 —
54
55 Remove all missing PVs from a VG.
56
57 vgreduce --removemissing VG
58 [ --mirrorsonly ]
59 [ COMMON_OPTIONS ]
60
61 —
62
63 Common options for command:
64 [ -A|--autobackup y|n ]
65 [ -f|--force ]
66 [ --reportformat basic|json|json_std ]
67
68 Common options for lvm:
69 [ -d|--debug ]
70 [ -h|--help ]
71 [ -q|--quiet ]
72 [ -t|--test ]
73 [ -v|--verbose ]
74 [ -y|--yes ]
75 [ --commandprofile String ]
76 [ --config String ]
77 [ --devices PV ]
78 [ --devicesfile String ]
79 [ --driverloaded y|n ]
80 [ --journal String ]
81 [ --lockopt String ]
82 [ --longhelp ]
83 [ --nohints ]
84 [ --nolocking ]
85 [ --profile String ]
86 [ --version ]
87
89 -a|--all
90 Removes all empty PVs if none are named on the command line.
91
92 -A|--autobackup y|n
93 Specifies if metadata should be backed up automatically after a
94 change. Enabling this is strongly advised! See vgcfgbackup(8)
95 for more information.
96
97 --commandprofile String
98 The command profile to use for command configuration. See
99 lvm.conf(5) for more information about profiles.
100
101 --config String
102 Config settings for the command. These override lvm.conf(5) set‐
103 tings. The String arg uses the same format as lvm.conf(5), or
104 may use section/field syntax. See lvm.conf(5) for more informa‐
105 tion about config.
106
107 -d|--debug ...
108 Set debug level. Repeat from 1 to 6 times to increase the detail
109 of messages sent to the log file and/or syslog (if configured).
110
111 --devices PV
112 Restricts the devices that are visible and accessible to the
113 command. Devices not listed will appear to be missing. This op‐
114 tion can be repeated, or accepts a comma separated list of de‐
115 vices. This overrides the devices file.
116
117 --devicesfile String
118 A file listing devices that LVM should use. The file must exist
119 in /etc/lvm/devices/ and is managed with the lvmdevices(8) com‐
120 mand. This overrides the lvm.conf(5) devices/devicesfile and
121 devices/use_devicesfile settings.
122
123 --driverloaded y|n
124 If set to no, the command will not attempt to use device-mapper.
125 For testing and debugging.
126
127 -f|--force ...
128 Override various checks, confirmations and protections. Use
129 with extreme caution.
130
131 -h|--help
132 Display help text.
133
134 --journal String
135 Record information in the systemd journal. This information is
136 in addition to information enabled by the lvm.conf log/journal
137 setting. command: record information about the command. out‐
138 put: record the default command output. debug: record full com‐
139 mand debugging.
140
141 --lockopt String
142 Used to pass options for special cases to lvmlockd. See lvm‐
143 lockd(8) for more information.
144
145 --longhelp
146 Display long help text.
147
148 --mirrorsonly
149 Only remove missing PVs from mirror LVs.
150
151 --nohints
152 Do not use the hints file to locate devices for PVs. A command
153 may read more devices to find PVs when hints are not used. The
154 command will still perform standard hint file invalidation where
155 appropriate.
156
157 --nolocking
158 Disable locking. Use with caution, concurrent commands may pro‐
159 duce incorrect results.
160
161 --profile String
162 An alias for --commandprofile or --metadataprofile, depending on
163 the command.
164
165 -q|--quiet ...
166 Suppress output and log messages. Overrides --debug and --ver‐
167 bose. Repeat once to also suppress any prompts with answer
168 'no'.
169
170 --removemissing
171 Removes all missing PVs from the VG, if there are no LVs allo‐
172 cated on them. This resumes normal operation of the VG (new LVs
173 may again be created, changed and so on). If this is not possi‐
174 ble because LVs are referencing the missing PVs, this option can
175 be combined with --force to have the command remove any partial
176 LVs. In this case, any LVs and dependent snapshots that were
177 partly on the missing disks are removed completely, including
178 those parts on disks that are still present. If LVs spanned
179 several disks, including ones that are lost, salvaging some data
180 first may be possible by activating LVs in partial mode.
181
182 --reportformat basic|json|json_std
183 Overrides current output format for reports which is defined
184 globally by the report/output_format setting in lvm.conf(5).
185 basic is the original format with columns and rows. If there is
186 more than one report per command, each report is prefixed with
187 the report name for identification. json produces report output
188 in JSON format. json_std produces report output in JSON format
189 which is more compliant with JSON standard. See lvmreport(7)
190 for more information.
191
192 -t|--test
193 Run in test mode. Commands will not update metadata. This is
194 implemented by disabling all metadata writing but nevertheless
195 returning success to the calling function. This may lead to un‐
196 usual error messages in multi-stage operations if a tool relies
197 on reading back metadata it believes has changed but hasn't.
198
199 -v|--verbose ...
200 Set verbose level. Repeat from 1 to 4 times to increase the de‐
201 tail of messages sent to stdout and stderr.
202
203 --version
204 Display version information.
205
206 -y|--yes
207 Do not prompt for confirmation interactively but always assume
208 the answer yes. Use with extreme caution. (For automatic no,
209 see -qq.)
210
212 VG Volume Group name. See lvm(8) for valid names.
213
214 PV Physical Volume name, a device path under /dev. For commands
215 managing physical extents, a PV positional arg generally accepts
216 a suffix indicating a range (or multiple ranges) of physical ex‐
217 tents (PEs). When the first PE is omitted, it defaults to the
218 start of the device, and when the last PE is omitted it defaults
219 to end. Start and end range (inclusive): PV[:PE-PE]... Start
220 and length range (counting from 0): PV[:PE+PE]...
221
222 String See the option description for information about the string con‐
223 tent.
224
225 Size[UNIT]
226 Size is an input number that accepts an optional unit. Input
227 units are always treated as base two values, regardless of capi‐
228 talization, e.g. 'k' and 'K' both refer to 1024. The default
229 input unit is specified by letter, followed by |UNIT. UNIT rep‐
230 resents other possible input units: b|B is bytes, s|S is sectors
231 of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB,
232 p|P is PiB, e|E is EiB. (This should not be confused with the
233 output control --units, where capital letters mean multiple of
234 1000.)
235
237 See lvm(8) for information about environment variables used by lvm.
238 For example, LVM_VG_NAME can generally be substituted for a required VG
239 parameter.
240
242 lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
243
244 pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
245 pvremove(8), pvresize(8), pvs(8), pvscan(8),
246
247 vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
248 vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
249 vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
250 vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
251
252 lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
253 lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
254
255 lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
256
257 dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
258 lvmdbusd(8), fsadm(8),
259
260 lvmsystemid(7), lvmreport(7), lvmraid(7), lvmthin(7), lvmcache(7)
261
262
263
264Red Hat, Inc. LVM TOOLS 2.03.18(2)-git (2022-11-10) VGREDUCE(8)