Site Tools


Sidebar

software:iscsi:initiator

rhel iscsi initiator

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

rhel iscsi initiator + multipathing

# 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*
software/iscsi/initiator.txt ยท Last modified: 2022/11/13 12:06 by 127.0.0.1