Imagine I have a number of block devices, that I know are the same device but who have different identificators (it may be a device cut and clued with dmsetup, exported multiple times through iSCSI, etc.). I can guarantee the same volume of them, yet they may have different types (physical device and FC target, for instance). I want to multipath them via multipath util.

man reads, that I can force different policies, but can I force multipath maps themselves? Whatever is the method for detecting path failure, whatever is the path priority policy, it does not depend on device type or their serial/IQN, so I see no conceptual problem in here. However, I do not find anything like that in documentation.

Any ideas?


1 Answer 1


Well, it was possible to create iSCSI target from SAS-connected device and export it to self to make it part of multipath, but it's more like a hack than force.

Steps are as follows:

1) dmsetup create disk_full --table '0 781422768 linear /dev/sdb 0' - we create dmsetup-ed disk from physical disk with full size

2) echo "50011731011379ec" > /sys/kernel/config/target/core/iblock_0/disk_full/wwn/vpd_unit_serial - we set the serial the same as the physical disk we want to multipath

3) targetcli /iscsi/iqn.2017-12.com.aa.iscsi:srv/tpg1/luns create /backstores/iblock/disk_full - we add our disk to the portal (it was created earlier)

4) iscsiadm -m node -l - we login to both remote machine with iSCSI target and our own

5) service multipathd start - we start multipath daemon if have not already

6) multipath -ll - voilà, here we have out multipathed disks

Note: without dmsetup trick I could never get the same serials: physical disk serial looks like 50011731011379ec even after export to LIO, while dmsetup-ed disk after LIO export gets 600140550011731011379ec000000000 serial, the same as the remote iSCSI target's serial.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .