diff options
author | David Teigland <teigland@redhat.com> | 2022-03-30 16:28:35 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-04-01 13:38:21 -0500 |
commit | 23a9bd549a27cba63c525e7b3042a67e428c798f (patch) | |
tree | 7bbba9743446bcf6e5a898ec3060bef3f11d5135 /lib/filters | |
parent | 6e22be20c66b85ee161d170571c65b0f383010e4 (diff) | |
download | lvm2-23a9bd549a27cba63c525e7b3042a67e428c798f.tar.gz |
lvmdevices update: correct multipath entries
Remove multipath components.
Add multipath devs that have multipath components listed.
Diffstat (limited to 'lib/filters')
-rw-r--r-- | lib/filters/filter-mpath.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/filters/filter-mpath.c b/lib/filters/filter-mpath.c index fc7cc51fa..854c26a7c 100644 --- a/lib/filters/filter-mpath.c +++ b/lib/filters/filter-mpath.c @@ -21,6 +21,8 @@ #include <dirent.h> +static int _lvmdevices_update_msg; + static int _ignore_mpath_component(struct cmd_context *cmd, struct dev_filter *f, struct device *dev, const char *use_filter_name) { dev_t mpath_devno = 0; @@ -41,6 +43,10 @@ static int _ignore_mpath_component(struct cmd_context *cmd, struct dev_filter *f log_warn("WARNING: devices file is missing %s (%d:%d) using multipath component %s.", mpath_dev ? dev_name(mpath_dev) : "unknown", (int)MAJOR(mpath_devno), (int)MINOR(mpath_devno), dev_name(dev)); + if (!_lvmdevices_update_msg && strcmp(get_cmd_name(), "lvmdevices")) { + log_warn("See lvmdevices --update for devices file update."); + _lvmdevices_update_msg = 1; + } } } |