mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
lvmetad: warn about making changes while not using lvmetad
If lvmetad is running, and a command opts to not use it (--config global/use_lvmetad=0), and the command changes metadata, then the metadata change is not visible to lvmetad. Subsequent commands using lvmetad to change metadata may cause corruption based on the invalid lvmetad state. Eventually we can set the disabled state in lvmetad to prevent this problem, but for now print a warning about the possibility.
This commit is contained in:
parent
6e6f8025ff
commit
1134ab6324
@ -1720,8 +1720,10 @@ static int _init_lvmetad(struct cmd_context *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!find_config_tree_bool(cmd, global_use_lvmetad_CFG, NULL)) {
|
if (!find_config_tree_bool(cmd, global_use_lvmetad_CFG, NULL)) {
|
||||||
if (lvmetad_pidfile_present())
|
if (lvmetad_pidfile_present()) {
|
||||||
log_warn("WARNING: Not using lvmetad because config setting use_lvmetad=0.");
|
log_warn("WARNING: Not using lvmetad because config setting use_lvmetad=0.");
|
||||||
|
log_warn("WARNING: To avoid corruption, rescan devices to make changes visible (pvscan --cache).");
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user