@@ -150,6 +150,7 @@ static void
select_action (struct multipath * mpp, vector curmp, int force_reload)
{
struct multipath * cmpp;
+ struct multipath * cmpp_tmp;
cmpp = find_mp_by_alias(curmp, mpp->alias);
@@ -169,7 +170,8 @@ select_action (struct multipath * mpp, v
return;
}
- if (!find_mp_by_wwid(curmp, mpp->wwid)) {
+ cmpp_tmp = find_mp_by_wwid(curmp, mpp->wwid);
+ if (!cmpp_tmp) {
condlog(2, "%s: remove (wwid changed)", cmpp->alias);
dm_flush_map(mpp->alias);
strncpy(cmpp->wwid, mpp->wwid, WWID_SIZE);
@@ -180,6 +182,14 @@ select_action (struct multipath * mpp, v
return;
}
+ if (cmpp != cmpp_tmp) {
+ condlog(2, "%s: unable to rename %s to %s (%s is used by %s)",
+ mpp->wwid, cmpp_tmp->alias, mpp->alias,
+ mpp->alias, cmpp->wwid);
+ mpp->action = ACT_NOTHING;
+ return;
+ }
+
if (pathcount(mpp, PATH_UP) == 0) {
mpp->action = ACT_NOTHING;
condlog(3, "%s: set ACT_NOTHING (no usable path)",