yum install -y iscsi-initiator-utils iscsiadm --mode discoverydb --type sendtargets --portal 192.168.4.1 --discover iscsiadm --mode node --targetname iqn.2009-11.com.example:storage.disk1 --portal 192.168.4.1:3260 --login # chkconfig iscsi on
# We have already ensured that we can reach the iscsi-target at 192.168.4.1 and 192.168.5.1 # Now we discover the targets over both paths and login iscsiadm --mode discoverydb --type sendtargets --portal 192.168.4.1 --discover iscsiadm --mode discoverydb --type sendtargets --portal 192.168.5.1 --discover iscsiadm --mode node --targetname iqn.2009-11.com.example:storage.disk1 --portal 192.168.5.1:3260 --login iscsiadm --mode node --targetname iqn.2009-11.com.example:storage.disk1 --portal 192.168.4.1:3260 --login yum install -y device-mapper-multipath cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc modprobe dm-multipath # the paths should now appear multipath -F multipath # To configure a multipath alias: cat >>/etc/multipath.conf<<EOT multipaths { multipath { wwid "1IET 00010001" alias foobar-alias } } EOT multipath -F multipath # To configure a udev-rule which cathes the disk: cat >>/etc/udev/rules.d/96-multipath.rules<<EOT ACTION=="add|change", ENV{DM_UUID}=="mpath-1IET 00010001", MODE="0777" EOT multipath -F multipath # the device should now have mode 777: ll /dev/dm*