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

NAME

6       vgextend — Add physical volumes to a volume group
7

SYNOPSIS

9       vgextend position_args
10           [ option_args ]
11

DESCRIPTION

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

USAGE

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|json_std ]
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           [    --devices PV ]
51           [    --devicesfile String ]
52           [    --driverloaded y|n ]
53           [    --journal String ]
54           [    --lockopt String ]
55           [    --longhelp ]
56           [    --nohints ]
57           [    --nolocking ]
58           [    --profile String ]
59           [    --version ]
60

OPTIONS

62       -A|--autobackup y|n
63              Specifies  if metadata should be backed up automatically after a
64              change.  Enabling this is strongly advised!  See  vgcfgbackup(8)
65              for more information.
66
67       --commandprofile String
68              The  command  profile  to  use  for  command configuration.  See
69              lvm.conf(5) for more information about profiles.
70
71       --config String
72              Config settings for the command. These override lvm.conf(5) set‐
73              tings.   The  String arg uses the same format as lvm.conf(5), or
74              may use section/field syntax.  See lvm.conf(5) for more informa‐
75              tion about config.
76
77       --dataalignment Size[k|UNIT]
78              Align  the  start of a PV data area with a multiple of this num‐
79              ber.  To see the location of the first Physical Extent  (PE)  of
80              an  existing  PV,  use  pvs -o +pe_start. In addition, it may be
81              shifted by an alignment offset, see --dataalignmentoffset.  Also
82              specify an appropriate PE size when creating a VG.
83
84       --dataalignmentoffset Size[k|UNIT]
85              Shift the start of the PV data area by this additional offset.
86
87       -d|--debug ...
88              Set debug level. Repeat from 1 to 6 times to increase the detail
89              of messages sent to the log file and/or syslog (if configured).
90
91       --devices PV
92              Restricts the devices that are visible  and  accessible  to  the
93              command.  Devices not listed will appear to be missing. This op‐
94              tion can be repeated, or accepts a comma separated list  of  de‐
95              vices. This overrides the devices file.
96
97       --devicesfile String
98              A file listing devices that LVM should use.  The file must exist
99              in /etc/lvm/devices/ and is managed with the lvmdevices(8)  com‐
100              mand.   This  overrides  the lvm.conf(5) devices/devicesfile and
101              devices/use_devicesfile settings.
102
103       --driverloaded y|n
104              If set to no, the command will not attempt to use device-mapper.
105              For testing and debugging.
106
107       -f|--force ...
108              Override  various  checks,  confirmations  and protections.  Use
109              with extreme caution.
110
111       -h|--help
112              Display help text.
113
114       --journal String
115              Record information in the systemd journal.  This information  is
116              in  addition  to information enabled by the lvm.conf log/journal
117              setting.  command: record information about the  command.   out‐
118              put: record the default command output.  debug: record full com‐
119              mand debugging.
120
121       --labelsector Number
122              By default the PV is labelled with an  LVM2  identifier  in  its
123              second  sector  (sector 1). This lets you use a different sector
124              near the start of the disk (between 0 and 3 inclusive - see  LA‐
125              BEL_SCAN_SECTORS in the source). Use with care.
126
127       --lockopt String
128              Used  to  pass  options for special cases to lvmlockd.  See lvm‐
129              lockd(8) for more information.
130
131       --longhelp
132              Display long help text.
133
134       --metadataignore y|n
135              Specifies the metadataignore property of a PV.  If yes, metadata
136              areas  on the PV are ignored, and lvm will not store metadata in
137              the metadata areas of the PV.  If no, lvm will store metadata on
138              the PV.
139
140       --metadatasize Size[m|UNIT]
141              The  approximate amount of space used for each VG metadata area.
142              The size may be rounded.
143
144       -M|--metadatatype lvm2
145              Specifies the type of on-disk metadata to use.  lvm2 (or just 2)
146              is  the current, standard format.  lvm1 (or just 1) is no longer
147              used.
148
149       --nohints
150              Do not use the hints file to locate devices for PVs.  A  command
151              may  read  more devices to find PVs when hints are not used. The
152              command will still perform standard hint file invalidation where
153              appropriate.
154
155       --nolocking
156              Disable  locking. Use with caution, concurrent commands may pro‐
157              duce incorrect results.
158
159       --profile String
160              An alias for --commandprofile or --metadataprofile, depending on
161              the command.
162
163       --pvmetadatacopies 0|1|2
164              The number of metadata areas to set aside on a PV for storing VG
165              metadata.  When 2, one copy of the VG metadata is stored at  the
166              front of the PV and a second copy is stored at the end.  When 1,
167              one copy of the VG metadata is stored at the front  of  the  PV.
168              When 0, no copies of the VG metadata are stored on the given PV.
169              This may be useful in VGs containing many PVs (this places limi‐
170              tations on the ability to use vgsplit later.)
171
172       -q|--quiet ...
173              Suppress  output  and log messages. Overrides --debug and --ver‐
174              bose.  Repeat once to also  suppress  any  prompts  with  answer
175              'no'.
176
177       --reportformat basic|json|json_std
178              Overrides  current  output  format  for reports which is defined
179              globally by the  report/output_format  setting  in  lvm.conf(5).
180              basic is the original format with columns and rows.  If there is
181              more than one report per command, each report is  prefixed  with
182              the  report name for identification. json produces report output
183              in JSON format. json_std produces report output in  JSON  format
184              which  is  more  compliant with JSON standard.  See lvmreport(7)
185              for more information.
186
187       --restoremissing
188              Add a PV back into a VG after the PV was missing  and  then  re‐
189              turned,  e.g.  due  to a transient failure. The PV is not reini‐
190              tialized.
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
211       -Z|--zero y|n
212              Controls  if  the first 4 sectors (2048 bytes) of the device are
213              wiped.  The default is to wipe these sectors  unless  either  or
214              both of --restorefile or --uuid are specified.
215

VARIABLES

217       VG     Volume Group name.  See lvm(8) for valid names.
218
219       PV     Physical  Volume  name,  a device path under /dev.  For commands
220              managing physical extents, a PV positional arg generally accepts
221              a suffix indicating a range (or multiple ranges) of physical ex‐
222              tents (PEs). When the first PE is omitted, it  defaults  to  the
223              start of the device, and when the last PE is omitted it defaults
224              to end.  Start and end range (inclusive):  PV[:PE-PE]...   Start
225              and length range (counting from 0): PV[:PE+PE]...
226
227       String See the option description for information about the string con‐
228              tent.
229
230       Size[UNIT]
231              Size is an input number that accepts an  optional  unit.   Input
232              units are always treated as base two values, regardless of capi‐
233              talization, e.g. 'k' and 'K' both refer to  1024.   The  default
234              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
235              resents other possible input units: b|B is bytes, s|S is sectors
236              of  512  bytes,  k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB,
237              p|P is PiB, e|E is EiB.  (This should not be confused  with  the
238              output  control  --units, where capital letters mean multiple of
239              1000.)
240

ENVIRONMENT VARIABLES

242       See lvm(8) for information about environment  variables  used  by  lvm.
243       For example, LVM_VG_NAME can generally be substituted for a required VG
244       parameter.
245

EXAMPLES

247       Add two PVs to a VG.
248       vgextend vg00 /dev/sda4 /dev/sdn1
249

SEE ALSO

251       lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
252
253       pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
254       pvremove(8), pvresize(8), pvs(8), pvscan(8),
255
256       vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
257       vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
258       vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
259       vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
260
261       lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
262       lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
263
264       lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
265
266       dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
267       lvmdbusd(8), fsadm(8),
268
269       lvmsystemid(7), lvmreport(7), lvmraid(7), lvmthin(7), lvmcache(7)
270
271
272
273Red Hat, Inc.        LVM TOOLS 2.03.18(2)-git (2022-11-10)         VGEXTEND(8)
Impressum