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 ]
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

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       --dataalignment Size[k|UNIT]
74              Align the start of the data to a multiple of this number.  Also
75              specify an appropriate Physical Extent size when creating a VG.
76              To see the location of the first Physical Extent of an existing
77              PV, use pvs -o +pe_start. In addition, it may be shifted by an
78              alignment offset.  See lvm.conf/data_alignment_offset_detection
79              and --dataalignmentoffset.
80
81       --dataalignmentoffset Size[k|UNIT]
82              Shift the start of the data area by this additional offset.
83
84       -d|--debug ...
85              Set debug level. Repeat from 1 to 6 times to increase the detail
86              of messages sent to the log file and/or syslog (if configured).
87
88       --driverloaded y|n
89              If set to no, the command will not attempt to use device-mapper.
90              For testing and debugging.
91
92       -f|--force ...
93              Override various checks, confirmations and protections.  Use
94              with extreme caution.
95
96       -h|--help
97              Display help text.
98
99       --labelsector Number
100              By default the PV is labelled with an LVM2 identifier in its
101              second sector (sector 1). This lets you use a different sector
102              near the start of the disk (between 0 and 3 inclusive - see
103              LABEL_SCAN_SECTORS in the source). Use with care.
104
105       --lockopt String
106              Used to pass options for special cases to lvmlockd.  See lvm‐
107              lockd(8) for more information.
108
109       --longhelp
110              Display long help text.
111
112       --metadataignore y|n
113              Specifies the metadataignore property of a PV.  If yes, metadata
114              areas on the PV are ignored, and lvm will not store metadata in
115              the metadata areas of the PV.  If no, lvm will store metadata on
116              the PV.
117
118       --metadatasize Size[m|UNIT]
119              The approximate amount of space used for each VG metadata area.
120              The size may be rounded.
121
122       -M|--metadatatype lvm2
123              Specifies the type of on-disk metadata to use.  lvm2 (or just 2)
124              is the current, standard format.  lvm1 (or just 1) is no longer
125              used.
126
127       --nolocking
128              Disable locking.
129
130       --profile String
131              An alias for --commandprofile or --metadataprofile, depending on
132              the command.
133
134       --pvmetadatacopies 0|1|2
135              The number of metadata areas to set aside on a PV for storing VG
136              metadata.  When 2, one copy of the VG metadata is stored at the
137              front of the PV and a second copy is stored at the end.  When 1,
138              one copy of the VG metadata is stored at the front of the PV
139              (starting in the 5th sector).  When 0, no copies of the VG meta‐
140              data are stored on the given PV.  This may be useful in VGs con‐
141              taining many PVs (this places limitations on the ability to use
142              vgsplit later.)
143
144       -q|--quiet ...
145              Suppress output and log messages. Overrides --debug and --ver‐
146              bose.  Repeat once to also suppress any prompts with answer
147              'no'.
148
149       --reportformat basic|json
150              Overrides current output format for reports which is defined
151              globally by the report/output_format setting in lvm.conf.  basic
152              is the original format with columns and rows.  If there is more
153              than one report per command, each report is prefixed with the
154              report name for identification. json produces report output in
155              JSON format. See lvmreport(7) for more information.
156
157       --restoremissing
158              Add a PV back into a VG after the PV was missing and then
159              returned, e.g. due to a transient failure. The PV is not reini‐
160              tialized.
161
162       -t|--test
163              Run in test mode. Commands will not update metadata.  This is
164              implemented by disabling all metadata writing but nevertheless
165              returning success to the calling function. This may lead to
166              unusual error messages in multi-stage operations if a tool
167              relies on reading back metadata it believes has changed but
168              hasn't.
169
170       -v|--verbose ...
171              Set verbose level. Repeat from 1 to 4 times to increase the
172              detail of messages sent to stdout and stderr.
173
174       --version
175              Display version information.
176
177       -y|--yes
178              Do not prompt for confirmation interactively but always assume
179              the answer yes. Use with extreme caution.  (For automatic no,
180              see -qq.)
181
182       -Z|--zero y|n
183              Controls if the first 4 sectors (2048 bytes) of the device are
184              wiped.  The default is to wipe these sectors unless either or
185              both of --restorefile or --uuid are specified.
186

VARIABLES

188       VG
189              Volume Group name.  See lvm(8) for valid names.
190
191       PV
192              Physical Volume name, a device path under  /dev.   For  commands
193              managing physical extents, a PV positional arg generally accepts
194              a suffix indicating a range (or  multiple  ranges)  of  physical
195              extents  (PEs). When the first PE is omitted, it defaults to the
196              start of the device, and when the last PE is omitted it defaults
197              to  end.   Start and end range (inclusive): PV[:PE-PE]...  Start
198              and length range (counting from 0): PV[:PE+PE]...
199
200       String
201              See the option description for information about the string con‐
202              tent.
203
204       Size[UNIT]
205              Size  is  an  input number that accepts an optional unit.  Input
206              units are always treated as base two values, regardless of capi‐
207              talization,  e.g.  'k'  and 'K' both refer to 1024.  The default
208              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
209              resents  other  possible  input units: bBsSkKmMgGtTpPeE.  b|B is
210              bytes, s|S is sectors of 512 bytes, k|K  is  kilobytes,  m|M  is
211              megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
212              e|E is exabytes.  (This should not be confused with  the  output
213              control --units, where capital letters mean multiple of 1000.)
214

ENVIRONMENT VARIABLES

216       See  lvm(8)  for  information  about environment variables used by lvm.
217       For example, LVM_VG_NAME can generally be substituted for a required VG
218       parameter.
219

EXAMPLES

221       Add two PVs to a VG.
222       vgextend vg00 /dev/sda4 /dev/sdn1
223

SEE ALSO

225       lvm(8) lvm.conf(5) lvmconfig(8)
226
227       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
228       pvresize(8) pvs(8) pvscan(8)
229
230       vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8)  vgcreate(8)  vgcon‐
231       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
232       clone(8) vgmerge(8) vgmknodes(8)  vgreduce(8)  vgremove(8)  vgrename(8)
233       vgs(8) vgscan(8) vgsplit(8)
234
235       lvcreate(8)  lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8) lvre‐
236       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
237
238       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
239       vate(8) lvmdump(8)
240
241       dmeventd(8)  lvmpolld(8)  lvmlockd(8)  lvmlockctl(8)  cmirrord(8) lvmd‐
242       busd(8)
243
244       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
245
246
247
248Red Hat, Inc.       LVM TOOLS 2.03.02(2)-RHEL8 (2019-01-04)        VGEXTEND(8)
Impressum