I have a probem with version 0.14.3 (ubuntu resolute version), that I don't have with 0.11.1 (ubuntu noble version).
On my device, I have a UFS storage, split into multiple LUNs. This makes the storage appear as multiple disks (sda, sdb, etc...).
Of course, all those disks have the same wwid (as it is the same storage). So multipath tries to handle them.
This brings 2 issues.
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index 9384de0..abdf933 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -300,6 +300,7 @@ int adopt_paths(vector pathvec, struct multipath *mpp,
int i, ret;
struct path * pp;
struct config *conf;
+ size_t count;
if (!mpp)
return 0;
@@ -307,6 +308,23 @@ int adopt_paths(vector pathvec, struct multipath *mpp,
if (update_mpp_paths(mpp, pathvec))
return 1;
+ count = 0;
+ vector_foreach_slot (pathvec, pp, i) {
+ if (!strncmp(mpp->wwid, pp->wwid, WWID_SIZE)) {
+ if (pp->size != 0 && mpp->size != 0 &&
+ pp->size != mpp->size) {
+ condlog(3, "%s: size mismatch for %s, not adding path",
+ pp->dev, mpp->alias);
+ continue;
+ }
+ count += 1;
+ }
+ }
+ if (count < 2) {
+ condlog(3, "%s: only one path, cancel creation", mpp->alias);
+ return 1;
+ }
+
vector_foreach_slot (pathvec, pp, i) {
if (!strncmp(mpp->wwid, pp->wwid, WWID_SIZE)) {
if (pp->size != 0 && mpp->size != 0 &&
Hello,
I have a probem with version 0.14.3 (ubuntu resolute version), that I don't have with 0.11.1 (ubuntu noble version).
On my device, I have a UFS storage, split into multiple LUNs. This makes the storage appear as multiple disks (sda, sdb, etc...).
Of course, all those disks have the same wwid (as it is the same storage). So multipath tries to handle them.
This brings 2 issues.
It will find sda, wwid X, then sdb, wwid X, so it will make a map. But sda won't be added, as the size differ. But the map is still created anyway. This has two bad side effect:
/etc/multipath/wwids, even if it is not;multipath -u /dev/sda # or sdbreturn 1, so on change uevent on those devices, udev rules68-del-part-nodes.ruleswill run/usr/bin/partx -d --nr 1-1024 $env{DEVNAME}. This makes for example disappear my boot partition (/dev/sda1), and so breaks my boot.I think size should be checked before making the map. Possible fix: