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

NAME

6       pvscan — List all physical volumes
7

SYNOPSIS

9       pvscan option_args position_args
10           [ option_args ]
11           [ position_args ]
12
13        -a|--activate y|n|ay
14           --autoactivation String
15           --cache
16           --checkcomplete
17           --commandprofile String
18           --config String
19        -d|--debug
20           --devices PV
21           --devicesfile String
22           --driverloaded y|n
23        -e|--exported
24        -h|--help
25           --ignorelockingfailure
26           --journal String
27           --listlvs
28           --listvg
29           --lockopt String
30           --longhelp
31        -j|--major Number
32           --minor Number
33           --nohints
34           --nolocking
35           --noudevsync
36        -n|--novolumegroup
37           --profile String
38        -q|--quiet
39           --reportformat basic|json|json_std
40        -s|--short
41        -t|--test
42           --udevoutput
43        -u|--uuid
44        -v|--verbose
45           --version
46           --vgonline
47        -y|--yes
48

DESCRIPTION

50       When called without the --cache option, pvscan lists PVs on the system,
51       like pvs(8) or pvdisplay(8).
52
53       When --cache is used, pvscan updates runtime lvm state on  the  system,
54       or with -aay performs autoactivation.
55
56       pvscan --cache device
57
58       If  device is present, lvm records that the PV on device is online.  If
59       device is not present, lvm removes the online record for the PV.   pvs‐
60       can only reads the named device.
61
62       pvscan --cache
63
64       Updates the runtime state for all lvm devices.
65
66       pvscan --cache -aay device
67
68       Performs  the --cache steps for the device, then checks if the VG using
69       the device is complete.  If so, LVs in the VG  are  autoactivated,  the
70       same  as vgchange -aay vgname would do.  (A device name may be replaced
71       with major and minor numbers.)
72
73       pvscan --cache -aay
74
75       Performs the --cache steps for all devices, then autoactivates any com‐
76       plete VGs.
77
78       pvscan --cache --listvg|--listlvs device
79
80       Performs  the --cache steps for the device, then prints the name of the
81       VG using the device, or the names of LVs using the device.  --checkcom‐
82       plete is usually included to check if all PVs for the VG or LVs are on‐
83       line.  When this command is called by a udev rule, the output must con‐
84       form  to  udev  rule  specifications (see --udevoutput.)  The udev rule
85       will use the results to perform autoactivation.
86
87       Autoactivation of VGs or LVs can be enabled/disabled using vgchange  or
88       lvchange   with   --setautoactivation   y|n,  or  by  adding  names  to
89       lvm.conf(5) activation/auto_activation_volume_list
90
91       See lvmautoactivation(7) for more information about how pvscan is  used
92       for autoactivation.
93

USAGE

95       Display PV information.
96
97       pvscan
98           [ -e|--exported ]
99           [ -n|--novolumegroup ]
100           [ -s|--short ]
101           [ -u|--uuid ]
102           [    --ignorelockingfailure ]
103           [    --reportformat basic|json|json_std ]
104           [ COMMON_OPTIONS ]
105
106
107
108       Record that a PV is online or offline.
109
110       pvscan --cache
111           [ -j|--major Number ]
112           [    --ignorelockingfailure ]
113           [    --reportformat basic|json|json_std ]
114           [    --minor Number ]
115           [    --noudevsync ]
116           [ COMMON_OPTIONS ]
117           [ String|PV ... ]
118
119
120
121       Record that a PV is online and autoactivate the VG if complete.
122
123       pvscan --cache -a|--activate ay
124           [ -j|--major Number ]
125           [    --ignorelockingfailure ]
126           [    --reportformat basic|json|json_std ]
127           [    --minor Number ]
128           [    --noudevsync ]
129           [    --autoactivation String ]
130           [ COMMON_OPTIONS ]
131           [ String|PV ... ]
132
133
134
135       Record that a PV is online and list the VG using the PV.
136
137       pvscan --cache --listvg PV
138           [    --ignorelockingfailure ]
139           [    --checkcomplete ]
140           [    --vgonline ]
141           [    --udevoutput ]
142           [    --autoactivation String ]
143           [ COMMON_OPTIONS ]
144
145
146
147       Record that a PV is online and list LVs using the PV.
148
149       pvscan --cache --listlvs PV
150           [    --ignorelockingfailure ]
151           [    --checkcomplete ]
152           [    --vgonline ]
153           [ COMMON_OPTIONS ]
154
155
156
157       List LVs using the PV.
158
159       pvscan --listlvs PV
160           [ COMMON_OPTIONS ]
161
162
163
164       List the VG using the PV.
165
166       pvscan --listvg PV
167           [ COMMON_OPTIONS ]
168
169
170
171       Common options for lvm:
172           [ -d|--debug ]
173           [ -h|--help ]
174           [ -q|--quiet ]
175           [ -t|--test ]
176           [ -v|--verbose ]
177           [ -y|--yes ]
178           [    --commandprofile String ]
179           [    --config String ]
180           [    --devices PV ]
181           [    --devicesfile String ]
182           [    --driverloaded y|n ]
183           [    --journal String ]
184           [    --lockopt String ]
185           [    --longhelp ]
186           [    --nohints ]
187           [    --nolocking ]
188           [    --profile String ]
189           [    --version ]
190

OPTIONS

192       -a|--activate y|n|ay
193              Auto-activate  LVs  in  a VG when the PVs scanned have completed
194              the VG.  (Only ay is applicable.)
195
196       --autoactivation String
197              Specify if autoactivation is being used from an event.  This al‐
198              lows  the  command  to apply settings that are specific to event
199              activation, such as device scanning optimizations using  pvs_on‐
200              line files created by event-based pvscans.
201
202       --cache
203              Scan one or more devices and record that they are online.
204
205       --checkcomplete
206              Check  if  all  the  devices used by a VG or LV are present, and
207              print "complete" or "incomplete" for each listed VG or LV.  This
208              option  is used as a part of event-based autoactivation, so pvs‐
209              can will do nothing if this option is set and event_activation=0
210              in the config settings.
211
212       --commandprofile String
213              The  command  profile  to  use  for  command configuration.  See
214              lvm.conf(5) for more information about profiles.
215
216       --config String
217              Config settings for the command. These override lvm.conf(5) set‐
218              tings.   The  String arg uses the same format as lvm.conf(5), or
219              may use section/field syntax.  See lvm.conf(5) for more informa‐
220              tion about config.
221
222       -d|--debug ...
223              Set debug level. Repeat from 1 to 6 times to increase the detail
224              of messages sent to the log file and/or syslog (if configured).
225
226       --devices PV
227              Restricts the devices that are visible  and  accessible  to  the
228              command.  Devices not listed will appear to be missing. This op‐
229              tion can be repeated, or accepts a comma separated list  of  de‐
230              vices. This overrides the devices file.
231
232       --devicesfile String
233              A file listing devices that LVM should use.  The file must exist
234              in /etc/lvm/devices/ and is managed with the lvmdevices(8)  com‐
235              mand.   This  overrides  the lvm.conf(5) devices/devicesfile and
236              devices/use_devicesfile settings.
237
238       --driverloaded y|n
239              If set to no, the command will not attempt to use device-mapper.
240              For testing and debugging.
241
242       -e|--exported
243              Only show PVs belonging to exported VGs.
244
245       -h|--help
246              Display help text.
247
248       --ignorelockingfailure
249              Allows  a command to continue with read-only metadata operations
250              after locking failures.
251
252       --journal String
253              Record information in the systemd journal.  This information  is
254              in  addition  to information enabled by the lvm.conf log/journal
255              setting.  command: record information about the  command.   out‐
256              put: record the default command output.  debug: record full com‐
257              mand debugging.
258
259       --listlvs
260              Print a list of LVs that use the device.
261
262       --listvg
263              Print the VG that uses the device.
264
265       --lockopt String
266              Used to pass options for special cases to  lvmlockd.   See  lvm‐
267              lockd(8) for more information.
268
269       --longhelp
270              Display long help text.
271
272       -j|--major Number
273              The major number of a device.
274
275       --minor Number
276              The minor number of a device.
277
278       --nohints
279              Do  not  use the hints file to locate devices for PVs. A command
280              may read more devices to find PVs when hints are not  used.  The
281              command will still perform standard hint file invalidation where
282              appropriate.
283
284       --nolocking
285              Disable locking. Use with caution, concurrent commands may  pro‐
286              duce incorrect results.
287
288       --noudevsync
289              Disables udev synchronisation. The process will not wait for no‐
290              tification from udev. It will continue irrespective of any  pos‐
291              sible  udev  processing in the background. Only use this if udev
292              is not running or has rules that ignore the devices LVM creates.
293
294       -n|--novolumegroup
295              Only show PVs not belonging to any VG.
296
297       --profile String
298              An alias for --commandprofile or --metadataprofile, depending on
299              the command.
300
301       -q|--quiet ...
302              Suppress  output  and log messages. Overrides --debug and --ver‐
303              bose.  Repeat once to also  suppress  any  prompts  with  answer
304              'no'.
305
306       --reportformat basic|json|json_std
307              Overrides  current  output  format  for reports which is defined
308              globally by the  report/output_format  setting  in  lvm.conf(5).
309              basic is the original format with columns and rows.  If there is
310              more than one report per command, each report is  prefixed  with
311              the  report name for identification. json produces report output
312              in JSON format. json_std produces report output in  JSON  format
313              which  is  more  compliant with JSON standard.  See lvmreport(7)
314              for more information.
315
316       -s|--short
317              Short listing format.
318
319       -t|--test
320              Run in test mode. Commands will not update  metadata.   This  is
321              implemented  by  disabling all metadata writing but nevertheless
322              returning success to the calling function. This may lead to  un‐
323              usual  error messages in multi-stage operations if a tool relies
324              on reading back metadata it believes has changed but hasn't.
325
326       --udevoutput
327              Command output is modified to be imported from a udev rule.
328
329       -u|--uuid
330              Show UUIDs in addition to device names.
331
332       -v|--verbose ...
333              Set verbose level. Repeat from 1 to 4 times to increase the  de‐
334              tail of messages sent to stdout and stderr.
335
336       --version
337              Display version information.
338
339       --vgonline
340              The  first command to see a complete VG will report it uniquely.
341              Other commands to see the complete VG  will  report  it  differ‐
342              ently.
343
344       -y|--yes
345              Do  not  prompt for confirmation interactively but always assume
346              the answer yes. Use with extreme caution.   (For  automatic  no,
347              see -qq.)
348

VARIABLES

350       PV     Physical  Volume  name,  a device path under /dev.  For commands
351              managing physical extents, a PV positional arg generally accepts
352              a suffix indicating a range (or multiple ranges) of physical ex‐
353              tents (PEs). When the first PE is omitted, it  defaults  to  the
354              start of the device, and when the last PE is omitted it defaults
355              to end.  Start and end range (inclusive):  PV[:PE-PE]...   Start
356              and length range (counting from 0): PV[:PE+PE]...
357
358       String See the option description for information about the string con‐
359              tent.
360
361       Size[UNIT]
362              Size is an input number that accepts an  optional  unit.   Input
363              units are always treated as base two values, regardless of capi‐
364              talization, e.g. 'k' and 'K' both refer to  1024.   The  default
365              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
366              resents other possible input units: b|B is bytes, s|S is sectors
367              of  512  bytes,  k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB,
368              p|P is PiB, e|E is EiB.  (This should not be confused  with  the
369              output  control  --units, where capital letters mean multiple of
370              1000.)
371

ENVIRONMENT VARIABLES

373       See lvm(8) for information about environment  variables  used  by  lvm.
374       For example, LVM_VG_NAME can generally be substituted for a required VG
375       parameter.
376

SEE ALSO

378       lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
379
380       pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
381       pvremove(8), pvresize(8), pvs(8), pvscan(8),
382
383       vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
384       vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
385       vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
386       vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
387
388       lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
389       lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
390
391       lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
392
393       dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
394       lvmdbusd(8), fsadm(8),
395
396       lvmsystemid(7), lvmreport(7), lvmraid(7), lvmthin(7), lvmcache(7)
397
398
399
400Red Hat, Inc.        LVM TOOLS 2.03.18(2)-git (2022-11-10)           PVSCAN(8)
Impressum