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

NAME

6       pvscan — scan all disks for physical volumes
7
8

SYNOPSIS

10       pvscan    [--commandprofile   ProfileName]   [-d|--debug]   [-h|--help]
11       [-v|--verbose]  [--version]  [--ignorelockingfailure]   [-e|--exported]
12       [-n|--novolumegroup] [-s|--short] [-u|--uuid]
13
14       pvscan  [-d|--debug] [-h|--help] --cache [-a|--activate ay] [-b|--back‐
15       ground] [--major major --minor minor | DevicePath | major:minor]...
16
17

DESCRIPTION

19       pvscan scans all supported LVM block devices in the system for physical
20       volumes.
21
22
23   Scanning with lvmetad
24       pvscan operates differently when used with the lvmetad(8) daemon.
25
26       Scanning  disks  is required to read LVM metadata and identify LVM PVs.
27       Once read, lvmetad caches the metadata so that LVM commands can read it
28       without  repeatedly  scanning  disks.  This is helpful because scanning
29       disks is time consuming, and frequent scanning may interfere  with  the
30       normal work of the system and disks.
31
32       When lvmetad is not used, LVM commands revert to scanning disks to read
33       metadata.  Any LVM command that needs metadata will scan disks for  it;
34       running  the  pvscan command is not necessary for the sake of other LVM
35       commands.
36
37       When lvmetad is used, LVM commands  avoid  scanning  disks  by  reading
38       metadata  from lvmetad.  When new disks appear, they must be scanned so
39       their metadata can be cached in lvmetad.  This is done by  the  command
40       pvscan --cache, which scans disks and passes the metadata to lvmetad.
41
42       The  pvscan  --cache  command  is typically run automatically by system
43       services when a new device appears.  Users do not generally need to run
44       this command if the system and lvmetad are running properly.
45
46       Many  scripts  contain unnecessary pvscan (or vgscan) commands for his‐
47       torical reasons.  To avoid disrupting the system with  extraneous  disk
48       scanning,  an  ordinary pvscan (without --cache) will simply read meta‐
49       data from lvmetad like other LVM commands.  It  does  not  do  anything
50       beyond displaying the current state of the cache.
51
52       Notes
53
54
55       · When  given  specific device name arguments, pvscan --cache will only
56         read the named devices.
57
58
59       · LVM udev rules and systemd services are  used  to  intiate  automatic
60         device scanning.
61
62
63       · To  prevent devices from being scanned by pvscan --cache, add them to
64         lvm.conf(5) devices/global_filter.  The devices/filter  setting  does
65         not apply to system level scanning.  For more information, see:
66         lvmconfig --withcomments devices/global_filter
67
68
69       · If  lvmetad  is started or restarted after devices are visible, or if
70         the global_filter has changed, then all devices must be rescanned for
71         metadata with the command pvscan --cache.
72
73
74       · lvmetad  ignores older metadata formats, e.g. lvm1, and should not be
75         used if they exist.
76
77
78       · To notify lvmetad about a device that is no longer present, the major
79         and minor numbers must be given, not the path.
80
81
82   Automatic activation
83       When  event-driven  system  services detect a new LVM device, the first
84       step is to automatically scan and cache the metadata from  the  device.
85       This  is  done  by  pvscan  --cache.  A second step is to automatically
86       activate LVs that are present on the new device.  This  auto-activation
87       is  done by the same pvscan --cache command when the option '-a|--acti‐
88       vate ay' is included.
89
90       Auto-activation of VGs or LVs can be enabled/disabled using:
91       lvm.conf(5) activation/auto_activation_volume_list
92
93       For more information, see:
94       lvmconfig --withcomments activation/auto_activation_volume_list
95
96       When this setting is undefined, all LVs are auto-activated (when lvm is
97       fully integrated with the event-driven system services.)
98
99       When  a  VG  or  LV is not auto-activated, traditional activation using
100       vgchange or lvchange -a|--activate is needed.
101
102       Notes
103
104
105       · pvscan auto-activation can be only done in combination with --cache.
106
107
108       · Auto-activation is designated by the "a" argument  in  '-a|--activate
109         ay'.   This  is  meant  to distinguish system generated commands from
110         explicit user commands, although it can be  used  in  any  activation
111         command.   Whenever  it  is  used, the auto_activation_volume_list is
112         applied.
113
114
115       · Auto-activation is not yet supported for LVs that are part of partial
116         or clustered volume groups.
117
118

OPTIONS

120       See lvm(8) for common options.
121
122       -e, --exported
123              Only show physical volumes belonging to exported volume groups.
124
125       -n, --novolumegroup
126              Only show physical volumes not belonging to any volume group.
127
128       -s, --short
129              Short listing format.
130
131       -u, --uuid
132              Show UUIDs in addition to device names.
133
134       -a, --activate ay
135              Automatically  activate any logical volumes that are possible to
136              activate with the addition of the new devices.
137
138       -b, --background
139              Run the command in the background.
140
141       --cache [--major major --minor minor | DevicePath | major:minor ]...
142              Scan one or more devices and send the metadata to lvmetad.
143
144

SEE ALSO

146       lvm(8), lvmconfig(8), lvmetad(8)
147
148
149
150Sistina Software UKLVM TOOLS 2.02.143(2)-RHEL6 (2016-12-13)          PVSCAN(8)
Impressum