mirror of
git://sourceware.org/git/lvm2.git
synced 2025-10-07 15:33:21 +03:00
Additional MD component checking
If udev info is missing for a device, (which would indicate if it's an MD component), then do an end-of-device read to check if a PV is an MD component. (This is skipped when using hints since we already know devs in hints are good.) A new config setting md_component_checks can be used to disable the additional end-of-device MD checks, or to always enable end-of-device MD checks. When both hints and udev info are disabled/unavailable, the end of PVs will now be scanned by default. If md devices with end-of-device superblocks are not being used, the extra I/O overhead can be avoided by setting md_component_checks="start".
This commit is contained in:
7
lib/cache/lvmcache.c
vendored
7
lib/cache/lvmcache.c
vendored
@@ -555,8 +555,11 @@ next:
|
||||
*/
|
||||
|
||||
if (!(info = lvmcache_info_from_pvid(alt->dev->pvid, NULL, 0))) {
|
||||
/* This shouldn't happen */
|
||||
log_warn("WARNING: PV %s on duplicate device %s not found in cache.",
|
||||
/*
|
||||
* This will happen if a duplicate dev has been dropped already,
|
||||
* e.g. it was found to be an md component.
|
||||
*/
|
||||
log_debug("PVID %s on duplicate device %s not found in cache.",
|
||||
alt->dev->pvid, dev_name(alt->dev));
|
||||
goto next;
|
||||
}
|
||||
|
Reference in New Issue
Block a user