1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +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:
David Teigland 2016-04-21 10:28:01 -05:00
parent 6e6f8025ff
commit 1134ab6324

View File

@ -1720,8 +1720,10 @@ static int _init_lvmetad(struct cmd_context *cmd)
}
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: To avoid corruption, rescan devices to make changes visible (pvscan --cache).");
}
return 1;
}