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

NAME

6       pvscan - List all physical volumes
7

SYNOPSIS

9       pvscan option_args
10           [ option_args ]
11           [ position_args ]
12

DESCRIPTION

14       When called without the --cache option, pvscan lists PVs on the system,
15       like pvs(8) or pvdisplay(8).
16
17       When the --cache and -aay options are used, pvscan  records  which  PVs
18       are  available on the system, and activates LVs in completed VGs.  A VG
19       is complete when pvscan sees that the final PV in the VG has  appeared.
20       This  is used by event-based system startup (systemd, udev) to activate
21       LVs.
22
23       The four main variations of this are:
24
25       pvscan --cache device
26
27       If device is present, lvm adds a record that the PV on  device  is  on‐
28       line.   If device is not present, lvm removes the online record for the
29       PV.  In most cases, the pvscan will only read the named devices.
30
31       pvscan --cache -aay device...
32
33       This begins by performing the same steps as above.  Afterward,  if  the
34       VG  for  the specified PV is complete, then pvscan will activate LVs in
35       the VG (the same as vgchange -aay vgname would do.)
36
37       pvscan --cache
38
39       This first clears all existing PV online records, then  scans  all  de‐
40       vices  on  the  system,  adding  PV online records for any PVs that are
41       found.
42
43       pvscan --cache -aay
44
45       This begins by performing the same steps as pvscan --cache.  Afterward,
46       it activates LVs in any complete VGs.
47
48       To  prevent  devices  from being scanned by pvscan --cache, add them to
49       lvm.conf(5) devices/global_filter.  For more information, see:
50       lvmconfig --withcomments devices/global_filter
51
52       Auto-activation of VGs or LVs can be enabled/disabled using:
53       lvm.conf(5) activation/auto_activation_volume_list
54
55       For more information, see:
56       lvmconfig --withcomments activation/auto_activation_volume_list
57
58       To disable auto-activation, explicitly set this list to an empty  list,
59       i.e. auto_activation_volume_list = [ ].
60
61       When this setting is undefined (e.g. commented), then all LVs are auto-
62       activated.
63
64

USAGE

66       Display PV information.
67
68       pvscan
69           [ -e|--exported ]
70           [ -n|--novolumegroup ]
71           [ -s|--short ]
72           [ -u|--uuid ]
73           [ COMMON_OPTIONS ]
74
75       Autoactivate a VG when all PVs are online.
76
77       pvscan --cache
78           [ -a|--activate ay ]
79           [ -j|--major Number ]
80           [    --minor Number ]
81           [    --noudevsync ]
82           [ COMMON_OPTIONS ]
83           [ String|PV ... ]
84
85       Common options for command:
86           [    --ignorelockingfailure ]
87           [    --reportformat basic|json ]
88
89       Common options for lvm:
90           [ -d|--debug ]
91           [ -h|--help ]
92           [ -q|--quiet ]
93           [ -t|--test ]
94           [ -v|--verbose ]
95           [ -y|--yes ]
96           [    --commandprofile String ]
97           [    --config String ]
98           [    --driverloaded y|n ]
99           [    --lockopt String ]
100           [    --longhelp ]
101           [    --nolocking ]
102           [    --profile String ]
103           [    --version ]
104

OPTIONS

106       -a|--activate y|n|ay
107              Auto-activate LVs in a VG when the PVs scanned have completed
108              the VG.  (Only ay is applicable.)
109
110       --cache
111              Scan one or more devices and record that they are online.
112
113       --commandprofile String
114              The command profile to use for command configuration.  See
115              lvm.conf(5) for more information about profiles.
116
117       --config String
118              Config settings for the command. These override lvm.conf set‐
119              tings.  The String arg uses the same format as lvm.conf, or may
120              use section/field syntax.  See lvm.conf(5) for more information
121              about config.
122
123       -d|--debug ...
124              Set debug level. Repeat from 1 to 6 times to increase the detail
125              of messages sent to the log file and/or syslog (if configured).
126
127       --driverloaded y|n
128              If set to no, the command will not attempt to use device-mapper.
129              For testing and debugging.
130
131       -e|--exported
132              Only show PVs belonging to exported VGs.
133
134       -h|--help
135              Display help text.
136
137       --ignorelockingfailure
138              Allows a command to continue with read-only metadata operations
139              after locking failures.
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       -j|--major Number
149              The major number of a device.
150
151       --minor Number
152              The minor number of a device.
153
154       --nolocking
155              Disable locking.
156
157       --noudevsync
158              Disables udev synchronisation. The process will not wait for no‐
159              tification from udev. It will continue irrespective of any pos‐
160              sible udev processing in the background. Only use this if udev
161              is not running or has rules that ignore the devices LVM creates.
162
163       -n|--novolumegroup
164              Only show PVs not belonging to any VG.
165
166       --profile String
167              An alias for --commandprofile or --metadataprofile, depending on
168              the command.
169
170       -q|--quiet ...
171              Suppress output and log messages. Overrides --debug and --ver‐
172              bose.  Repeat once to also suppress any prompts with answer
173              'no'.
174
175       --reportformat basic|json
176              Overrides current output format for reports which is defined
177              globally by the report/output_format setting in lvm.conf.  basic
178              is the original format with columns and rows.  If there is more
179              than one report per command, each report is prefixed with the
180              report name for identification. json produces report output in
181              JSON format. See lvmreport(7) for more information.
182
183       -s|--short
184              Short listing format.
185
186       -t|--test
187              Run in test mode. Commands will not update metadata.  This is
188              implemented by disabling all metadata writing but nevertheless
189              returning success to the calling function. This may lead to un‐
190              usual error messages in multi-stage operations if a tool relies
191              on reading back metadata it believes has changed but hasn't.
192
193       -u|--uuid
194              Show UUIDs in addition to device names.
195
196       -v|--verbose ...
197              Set verbose level. Repeat from 1 to 4 times to increase the de‐
198              tail of messages sent to stdout and stderr.
199
200       --version
201              Display version information.
202
203       -y|--yes
204              Do not prompt for confirmation interactively but always assume
205              the answer yes. Use with extreme caution.  (For automatic no,
206              see -qq.)
207

VARIABLES

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

ENVIRONMENT VARIABLES

234       See lvm(8) for information about environment  variables  used  by  lvm.
235       For example, LVM_VG_NAME can generally be substituted for a required VG
236       parameter.
237

SEE ALSO

239       lvm(8) lvm.conf(5) lvmconfig(8)
240
241       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
242       pvresize(8) pvs(8) pvscan(8)
243
244       vgcfgbackup(8)  vgcfgrestore(8)  vgchange(8) vgck(8) vgcreate(8) vgcon‐
245       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
246       clone(8)  vgmerge(8)  vgmknodes(8)  vgreduce(8) vgremove(8) vgrename(8)
247       vgs(8) vgscan(8) vgsplit(8)
248
249       lvcreate(8) lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8)  lvre‐
250       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
251
252       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
253       vate(8) lvmdump(8)
254
255       dmeventd(8) lvmpolld(8)  lvmlockd(8)  lvmlockctl(8)  cmirrord(8)  lvmd‐
256       busd(8)
257
258       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
259
260
261
262Red Hat, Inc.          LVM TOOLS 2.03.11(2) (2021-01-08)             PVSCAN(8)
Impressum