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

NAME

6       pvresize — Resize physical volume(s)
7

SYNOPSIS

9       pvresize position_args
10           [ option_args ]
11

DESCRIPTION

13       pvresize  resizes  a PV. The PV may already be in a VG and may have ac‐
14       tive LVs allocated on it.
15

USAGE

17       pvresize PV ...
18           [    --setphysicalvolumesize Size[m|UNIT] ]
19           [    --reportformat basic|json|json_std ]
20           [ COMMON_OPTIONS ]
21
22       Common options for lvm:
23           [ -d|--debug ]
24           [ -h|--help ]
25           [ -q|--quiet ]
26           [ -t|--test ]
27           [ -v|--verbose ]
28           [ -y|--yes ]
29           [    --commandprofile String ]
30           [    --config String ]
31           [    --devices PV ]
32           [    --devicesfile String ]
33           [    --driverloaded y|n ]
34           [    --journal String ]
35           [    --lockopt String ]
36           [    --longhelp ]
37           [    --nohints ]
38           [    --nolocking ]
39           [    --profile String ]
40           [    --version ]
41

OPTIONS

43       --commandprofile String
44              The command profile  to  use  for  command  configuration.   See
45              lvm.conf(5) for more information about profiles.
46
47       --config String
48              Config settings for the command. These override lvm.conf(5) set‐
49              tings.  The String arg uses the same format as  lvm.conf(5),  or
50              may use section/field syntax.  See lvm.conf(5) for more informa‐
51              tion about config.
52
53       -d|--debug ...
54              Set debug level. Repeat from 1 to 6 times to increase the detail
55              of messages sent to the log file and/or syslog (if configured).
56
57       --devices PV
58              Restricts  the  devices  that  are visible and accessible to the
59              command.  Devices not listed will appear to be missing. This op‐
60              tion  can  be repeated, or accepts a comma separated list of de‐
61              vices. This overrides the devices file.
62
63       --devicesfile String
64              A file listing devices that LVM should use.  The file must exist
65              in  /etc/lvm/devices/ and is managed with the lvmdevices(8) com‐
66              mand.  This overrides the  lvm.conf(5)  devices/devicesfile  and
67              devices/use_devicesfile settings.
68
69       --driverloaded y|n
70              If set to no, the command will not attempt to use device-mapper.
71              For testing and debugging.
72
73       -h|--help
74              Display help text.
75
76       --journal String
77              Record information in the systemd journal.  This information  is
78              in  addition  to information enabled by the lvm.conf log/journal
79              setting.  command: record information about the  command.   out‐
80              put: record the default command output.  debug: record full com‐
81              mand debugging.
82
83       --lockopt String
84              Used to pass options for special cases to  lvmlockd.   See  lvm‐
85              lockd(8) for more information.
86
87       --longhelp
88              Display long help text.
89
90       --nohints
91              Do  not  use the hints file to locate devices for PVs. A command
92              may read more devices to find PVs when hints are not  used.  The
93              command will still perform standard hint file invalidation where
94              appropriate.
95
96       --nolocking
97              Disable locking. Use with caution, concurrent commands may  pro‐
98              duce incorrect results.
99
100       --profile String
101              An alias for --commandprofile or --metadataprofile, depending on
102              the command.
103
104       -q|--quiet ...
105              Suppress output and log messages. Overrides --debug  and  --ver‐
106              bose.   Repeat  once  to  also  suppress any prompts with answer
107              'no'.
108
109       --reportformat basic|json|json_std
110              Overrides current output format for  reports  which  is  defined
111              globally  by  the  report/output_format  setting in lvm.conf(5).
112              basic is the original format with columns and rows.  If there is
113              more  than  one report per command, each report is prefixed with
114              the report name for identification. json produces report  output
115              in  JSON  format. json_std produces report output in JSON format
116              which is more compliant with JSON  standard.   See  lvmreport(7)
117              for more information.
118
119       --setphysicalvolumesize Size[m|UNIT]
120              Overrides  the  automatically detected size of the PV.  Use with
121              care, or prior to reducing the physical size of the device.
122
123       -t|--test
124              Run in test mode. Commands will not update  metadata.   This  is
125              implemented  by  disabling all metadata writing but nevertheless
126              returning success to the calling function. This may lead to  un‐
127              usual  error messages in multi-stage operations if a tool relies
128              on reading back metadata it believes has changed but hasn't.
129
130       -v|--verbose ...
131              Set verbose level. Repeat from 1 to 4 times to increase the  de‐
132              tail of messages sent to stdout and stderr.
133
134       --version
135              Display version information.
136
137       -y|--yes
138              Do  not  prompt for confirmation interactively but always assume
139              the answer yes. Use with extreme caution.   (For  automatic  no,
140              see -qq.)
141

VARIABLES

143       PV     Physical  Volume  name,  a device path under /dev.  For commands
144              managing physical extents, a PV positional arg generally accepts
145              a suffix indicating a range (or multiple ranges) of physical ex‐
146              tents (PEs). When the first PE is omitted, it  defaults  to  the
147              start of the device, and when the last PE is omitted it defaults
148              to end.  Start and end range (inclusive):  PV[:PE-PE]...   Start
149              and length range (counting from 0): PV[:PE+PE]...
150
151       String See the option description for information about the string con‐
152              tent.
153
154       Size[UNIT]
155              Size is an input number that accepts an  optional  unit.   Input
156              units are always treated as base two values, regardless of capi‐
157              talization, e.g. 'k' and 'K' both refer to  1024.   The  default
158              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
159              resents other possible input units: b|B is bytes, s|S is sectors
160              of  512  bytes,  k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB,
161              p|P is PiB, e|E is EiB.  (This should not be confused  with  the
162              output  control  --units, where capital letters mean multiple of
163              1000.)
164

ENVIRONMENT VARIABLES

166       See lvm(8) for information about environment  variables  used  by  lvm.
167       For example, LVM_VG_NAME can generally be substituted for a required VG
168       parameter.
169

NOTES

171       pvresize will refuse to shrink a PV if it has allocated extents  beyond
172       the new end.
173

EXAMPLES

175       Expand a PV after enlarging the partition.
176       pvresize /dev/sda1
177
178       Shrink  a  PV prior to shrinking the partition (ensure that the PV size
179       is appropriate for the intended new partition size).
180       pvresize --setphysicalvolumesize 40G /dev/sda1
181

SEE ALSO

183       lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
184
185       pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
186       pvremove(8), pvresize(8), pvs(8), pvscan(8),
187
188       vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
189       vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
190       vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
191       vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
192
193       lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
194       lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
195
196       lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
197
198       dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
199       lvmdbusd(8), fsadm(8),
200
201       lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7),
202       lvmvdo(7), lvmautoactivation(7)
203
204
205
206
207Red Hat, Inc.          LVM TOOLS 2.03.22(2) (2023-08-02)           PVRESIZE(8)
Impressum