-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use temp files in /run/lvm/vgs_online/ to keep track of when a VG has been autoactivated by pvscan. When pvscan autoactivates a VG, it creates a temp file with the VG's name. Before a subsequent pvscan tries to autoactivate the same VG, it checks if a temp file exists for the VG name, and if so it skips it. This can commonly happen when many devices appear on the system at once, which generates several concurrent pvscans. In this case the first pvscan does initialization by scanning all devices and activating any complete VGs. The other pvscans would attempt to activate the same complete VGs again. This extra work could create a bottleneck of pvscan commands. If a VG is deactivated by vgchange, the vg online file is removed. If PVs are then disconnected/reconnected, pvscan will again autoactivate the VG. Also, this patch disables the VG refresh that could be called from pvscan --cache -aay if lvmetad detects metadata inconsistencies. The role of pvscan should be limited to basic autoactivation, and any refresh scenarios are special cases that are not appropriate for automation. The warning printed by commands retrying an lvmetad connection has been reduced to once every 10 seconds. New output messages have been added to pvscan to record when pvscan is falling back to direct activation of all VGs.
- Loading branch information
Showing
3 changed files
with
123 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters