1VGEXTEND(8) System Manager's Manual VGEXTEND(8)
2
3
4
6 vgextend - Add physical volumes to a volume group
7
9 vgextend position_args
10 [ option_args ]
11
13 vgextend adds one or more PVs to a VG. This increases the space avail‐
14 able for LVs in the VG.
15
16 Also, PVs that have gone missing and then returned, e.g. due to a tran‐
17 sient device failure, can be added back to the VG without re-initializ‐
18 ing them (see --restoremissing).
19
20 If the specified PVs have not yet been initialized with pvcreate, vgex‐
21 tend will initialize them. In this case pvcreate options can be used,
22 e.g. --labelsector, --metadatasize, --metadataignore, --pvmetadata‐
23 copies, --dataalignment, --dataalignmentoffset.
24
26 vgextend VG PV ...
27 [ -A|--autobackup y|n ]
28 [ -f|--force ]
29 [ -Z|--zero y|n ]
30 [ -M|--metadatatype lvm2 ]
31 [ --labelsector Number ]
32 [ --metadatasize Size[m|UNIT] ]
33 [ --pvmetadatacopies 0|1|2 ]
34 [ --metadataignore y|n ]
35 [ --dataalignment Size[k|UNIT] ]
36 [ --dataalignmentoffset Size[k|UNIT] ]
37 [ --reportformat basic|json ]
38 [ --restoremissing ]
39 [ COMMON_OPTIONS ]
40
41 Common options for lvm:
42 [ -d|--debug ]
43 [ -h|--help ]
44 [ -q|--quiet ]
45 [ -t|--test ]
46 [ -v|--verbose ]
47 [ -y|--yes ]
48 [ --commandprofile String ]
49 [ --config String ]
50 [ --driverloaded y|n ]
51 [ --lockopt String ]
52 [ --longhelp ]
53 [ --nolocking ]
54 [ --profile String ]
55 [ --version ]
56
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 --dataalignment Size[k|UNIT]
74 Align the start of a PV data area with a multiple of this num‐
75 ber. To see the location of the first Physical Extent (PE) of
76 an existing PV, use pvs -o +pe_start. In addition, it may be
77 shifted by an alignment offset, see --dataalignmentoffset. Also
78 specify an appropriate PE size when creating a VG.
79
80 --dataalignmentoffset Size[k|UNIT]
81 Shift the start of the PV data area by this additional offset.
82
83 -d|--debug ...
84 Set debug level. Repeat from 1 to 6 times to increase the detail
85 of messages sent to the log file and/or syslog (if configured).
86
87 --driverloaded y|n
88 If set to no, the command will not attempt to use device-mapper.
89 For testing and debugging.
90
91 -f|--force ...
92 Override various checks, confirmations and protections. Use
93 with extreme caution.
94
95 -h|--help
96 Display help text.
97
98 --labelsector Number
99 By default the PV is labelled with an LVM2 identifier in its
100 second sector (sector 1). This lets you use a different sector
101 near the start of the disk (between 0 and 3 inclusive - see LA‐
102 BEL_SCAN_SECTORS in the source). Use with care.
103
104 --lockopt String
105 Used to pass options for special cases to lvmlockd. See lvm‐
106 lockd(8) for more information.
107
108 --longhelp
109 Display long help text.
110
111 --metadataignore y|n
112 Specifies the metadataignore property of a PV. If yes, metadata
113 areas on the PV are ignored, and lvm will not store metadata in
114 the metadata areas of the PV. If no, lvm will store metadata on
115 the PV.
116
117 --metadatasize Size[m|UNIT]
118 The approximate amount of space used for each VG metadata area.
119 The size may be rounded.
120
121 -M|--metadatatype lvm2
122 Specifies the type of on-disk metadata to use. lvm2 (or just 2)
123 is the current, standard format. lvm1 (or just 1) is no longer
124 used.
125
126 --nolocking
127 Disable locking.
128
129 --profile String
130 An alias for --commandprofile or --metadataprofile, depending on
131 the command.
132
133 --pvmetadatacopies 0|1|2
134 The number of metadata areas to set aside on a PV for storing VG
135 metadata. When 2, one copy of the VG metadata is stored at the
136 front of the PV and a second copy is stored at the end. When 1,
137 one copy of the VG metadata is stored at the front of the PV.
138 When 0, no copies of the VG metadata are stored on the given PV.
139 This may be useful in VGs containing many PVs (this places limi‐
140 tations on the ability to use vgsplit later.)
141
142 -q|--quiet ...
143 Suppress output and log messages. Overrides --debug and --ver‐
144 bose. Repeat once to also suppress any prompts with answer
145 'no'.
146
147 --reportformat basic|json
148 Overrides current output format for reports which is defined
149 globally by the report/output_format setting in lvm.conf. basic
150 is the original format with columns and rows. If there is more
151 than one report per command, each report is prefixed with the
152 report name for identification. json produces report output in
153 JSON format. See lvmreport(7) for more information.
154
155 --restoremissing
156 Add a PV back into a VG after the PV was missing and then re‐
157 turned, e.g. due to a transient failure. The PV is not reini‐
158 tialized.
159
160 -t|--test
161 Run in test mode. Commands will not update metadata. This is
162 implemented by disabling all metadata writing but nevertheless
163 returning success to the calling function. This may lead to un‐
164 usual error messages in multi-stage operations if a tool relies
165 on reading back metadata it believes has changed but hasn't.
166
167 -v|--verbose ...
168 Set verbose level. Repeat from 1 to 4 times to increase the de‐
169 tail 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
179 -Z|--zero y|n
180 Controls if the first 4 sectors (2048 bytes) of the device are
181 wiped. The default is to wipe these sectors unless either or
182 both of --restorefile or --uuid are specified.
183
185 VG
186 Volume Group name. See lvm(8) for valid names.
187
188 PV
189 Physical Volume name, a device path under /dev. For commands
190 managing physical extents, a PV positional arg generally accepts
191 a suffix indicating a range (or multiple ranges) of physical ex‐
192 tents (PEs). When the first PE is omitted, it defaults to the
193 start of the device, and when the last PE is omitted it defaults
194 to end. Start and end range (inclusive): PV[:PE-PE]... Start
195 and length range (counting from 0): PV[:PE+PE]...
196
197 String
198 See the option description for information about the string con‐
199 tent.
200
201 Size[UNIT]
202 Size is an input number that accepts an optional unit. Input
203 units are always treated as base two values, regardless of capi‐
204 talization, e.g. 'k' and 'K' both refer to 1024. The default
205 input unit is specified by letter, followed by |UNIT. UNIT rep‐
206 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
207 bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G
208 is GiB, t|T is TiB, p|P is PiB, e|E is EiB. (This should not be
209 confused with the output control --units, where capital letters
210 mean multiple of 1000.)
211
213 See lvm(8) for information about environment variables used by lvm.
214 For example, LVM_VG_NAME can generally be substituted for a required VG
215 parameter.
216
218 Add two PVs to a VG.
219 vgextend vg00 /dev/sda4 /dev/sdn1
220
222 lvm(8) lvm.conf(5) lvmconfig(8)
223
224 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
225 pvresize(8) pvs(8) pvscan(8)
226
227 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
228 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
229 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
230 vgs(8) vgscan(8) vgsplit(8)
231
232 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
233 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
234
235 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
236 vate(8) lvmdump(8)
237
238 dmeventd(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) cmirrord(8) lvmd‐
239 busd(8)
240
241 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
242
243
244
245Red Hat, Inc. LVM TOOLS 2.03.11(2) (2021-01-08) VGEXTEND(8)