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 [ --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
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
159 notification from udev. It will continue irrespective of any
160 possible udev processing in the background. Only use this if
161 udev is not running or has rules that ignore the devices LVM
162 creates.
163
164 -n|--novolumegroup
165 Only show PVs not belonging to any VG.
166
167 --profile String
168 An alias for --commandprofile or --metadataprofile, depending on
169 the command.
170
171 -q|--quiet ...
172 Suppress output and log messages. Overrides --debug and --ver‐
173 bose. Repeat once to also suppress any prompts with answer
174 'no'.
175
176 --reportformat basic|json
177 Overrides current output format for reports which is defined
178 globally by the report/output_format setting in lvm.conf. basic
179 is the original format with columns and rows. If there is more
180 than one report per command, each report is prefixed with the
181 report name for identification. json produces report output in
182 JSON format. See lvmreport(7) for more information.
183
184 -s|--short
185 Short listing format.
186
187 -t|--test
188 Run in test mode. Commands will not update metadata. This is
189 implemented by disabling all metadata writing but nevertheless
190 returning success to the calling function. This may lead to
191 unusual error messages in multi-stage operations if a tool
192 relies on reading back metadata it believes has changed but
193 hasn't.
194
195 -u|--uuid
196 Show UUIDs in addition to device names.
197
198 -v|--verbose ...
199 Set verbose level. Repeat from 1 to 4 times to increase the
200 detail of messages sent to stdout and stderr.
201
202 --version
203 Display version information.
204
205 -y|--yes
206 Do not prompt for confirmation interactively but always assume
207 the answer yes. Use with extreme caution. (For automatic no,
208 see -qq.)
209
211 PV
212 Physical Volume name, a device path under /dev. For commands
213 managing physical extents, a PV positional arg generally accepts
214 a suffix indicating a range (or multiple ranges) of physical
215 extents (PEs). When the first PE is omitted, it defaults to the
216 start of the device, and when the last PE is omitted it defaults
217 to end. Start and end range (inclusive): PV[:PE-PE]... Start
218 and length range (counting from 0): PV[:PE+PE]...
219
220 String
221 See the option description for information about the string con‐
222 tent.
223
224 Size[UNIT]
225 Size is an input number that accepts an optional unit. Input
226 units are always treated as base two values, regardless of capi‐
227 talization, e.g. 'k' and 'K' both refer to 1024. The default
228 input unit is specified by letter, followed by |UNIT. UNIT rep‐
229 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
230 bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is
231 megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
232 e|E is exabytes. (This should not be confused with the output
233 control --units, where capital letters mean multiple of 1000.)
234
236 See lvm(8) for information about environment variables used by lvm.
237 For example, LVM_VG_NAME can generally be substituted for a required VG
238 parameter.
239
241 lvm(8) lvm.conf(5) lvmconfig(8)
242
243 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
244 pvresize(8) pvs(8) pvscan(8)
245
246 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
247 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
248 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
249 vgs(8) vgscan(8) vgsplit(8)
250
251 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
252 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
253
254 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
255 vate(8) lvmdump(8)
256
257 dmeventd(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) cmirrord(8) lvmd‐
258 busd(8)
259
260 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
261
262
263
264Red Hat, Inc. LVM TOOLS 2.03.06(2) (2019-10-23) PVSCAN(8)