1PVSCAN(8) System Manager's Manual PVSCAN(8)
2
3
4
6 pvscan - List all physical volumes
7
9 pvscan option_args
10 [ option_args ]
11 [ position_args ]
12
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
28 online. If device is not present, lvm removes the online record for
29 the 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
40 devices 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
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 [ COMMON_OPTIONS ]
82 [ String|PV ... ]
83
84 Common options for command:
85 [ --ignorelockingfailure ]
86 [ --reportformat basic|json ]
87
88 Common options for lvm:
89 [ -d|--debug ]
90 [ -h|--help ]
91 [ -q|--quiet ]
92 [ -t|--test ]
93 [ -v|--verbose ]
94 [ -y|--yes ]
95 [ --commandprofile String ]
96 [ --config String ]
97 [ --driverloaded y|n ]
98 [ --lockopt String ]
99 [ --longhelp ]
100 [ --nolocking ]
101 [ --profile String ]
102 [ --version ]
103
105 -a|--activate y|n|ay
106 Auto-activate LVs in a VG when the PVs scanned have completed
107 the VG. (Only ay is applicable.)
108
109 --cache
110 Scan one or more devices and record that they are online.
111
112 --commandprofile String
113 The command profile to use for command configuration. See
114 lvm.conf(5) for more information about profiles.
115
116 --config String
117 Config settings for the command. These override lvm.conf set‐
118 tings. The String arg uses the same format as lvm.conf, or may
119 use section/field syntax. See lvm.conf(5) for more information
120 about config.
121
122 -d|--debug ...
123 Set debug level. Repeat from 1 to 6 times to increase the detail
124 of messages sent to the log file and/or syslog (if configured).
125
126 --driverloaded y|n
127 If set to no, the command will not attempt to use device-mapper.
128 For testing and debugging.
129
130 -e|--exported
131 Only show PVs belonging to exported VGs.
132
133 -h|--help
134 Display help text.
135
136 --ignorelockingfailure
137 Allows a command to continue with read-only metadata operations
138 after locking failures.
139
140 --lockopt String
141 Used to pass options for special cases to lvmlockd. See lvm‐
142 lockd(8) for more information.
143
144 --longhelp
145 Display long help text.
146
147 -j|--major Number
148 The major number of a device.
149
150 --minor Number
151 The minor number of a device.
152
153 --nolocking
154 Disable locking.
155
156 -n|--novolumegroup
157 Only show PVs not belonging to any VG.
158
159 --profile String
160 An alias for --commandprofile or --metadataprofile, depending on
161 the command.
162
163 -q|--quiet ...
164 Suppress output and log messages. Overrides --debug and --ver‐
165 bose. Repeat once to also suppress any prompts with answer
166 'no'.
167
168 --reportformat basic|json
169 Overrides current output format for reports which is defined
170 globally by the report/output_format setting in lvm.conf. basic
171 is the original format with columns and rows. If there is more
172 than one report per command, each report is prefixed with the
173 report name for identification. json produces report output in
174 JSON format. See lvmreport(7) for more information.
175
176 -s|--short
177 Short listing format.
178
179 -t|--test
180 Run in test mode. Commands will not update metadata. This is
181 implemented by disabling all metadata writing but nevertheless
182 returning success to the calling function. This may lead to
183 unusual error messages in multi-stage operations if a tool
184 relies on reading back metadata it believes has changed but
185 hasn't.
186
187 -u|--uuid
188 Show UUIDs in addition to device names.
189
190 -v|--verbose ...
191 Set verbose level. Repeat from 1 to 4 times to increase the
192 detail of messages sent to stdout and stderr.
193
194 --version
195 Display version information.
196
197 -y|--yes
198 Do not prompt for confirmation interactively but always assume
199 the answer yes. Use with extreme caution. (For automatic no,
200 see -qq.)
201
203 PV
204 Physical Volume name, a device path under /dev. For commands
205 managing physical extents, a PV positional arg generally accepts
206 a suffix indicating a range (or multiple ranges) of physical
207 extents (PEs). When the first PE is omitted, it defaults to the
208 start of the device, and when the last PE is omitted it defaults
209 to end. Start and end range (inclusive): PV[:PE-PE]... Start
210 and length range (counting from 0): PV[:PE+PE]...
211
212 String
213 See the option description for information about the string con‐
214 tent.
215
216 Size[UNIT]
217 Size is an input number that accepts an optional unit. Input
218 units are always treated as base two values, regardless of capi‐
219 talization, e.g. 'k' and 'K' both refer to 1024. The default
220 input unit is specified by letter, followed by |UNIT. UNIT rep‐
221 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
222 bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is
223 megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
224 e|E is exabytes. (This should not be confused with the output
225 control --units, where capital letters mean multiple of 1000.)
226
228 See lvm(8) for information about environment variables used by lvm.
229 For example, LVM_VG_NAME can generally be substituted for a required VG
230 parameter.
231
233 lvm(8) lvm.conf(5) lvmconfig(8)
234
235 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
236 pvresize(8) pvs(8) pvscan(8)
237
238 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
239 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
240 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
241 vgs(8) vgscan(8) vgsplit(8)
242
243 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
244 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
245
246 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
247 vate(8) lvmdump(8)
248
249 dmeventd(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) cmirrord(8) lvmd‐
250 busd(8)
251
252 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
253
254
255
256Red Hat, Inc. LVM TOOLS 2.03.02(2)-RHEL8 (2019-01-04) PVSCAN(8)