Admin notes
Instruction on how to connect iSCSI on the server
- Install packages: yum install -y libiscsi-utils iscsi-initiator-utils device-mapper-multipath
- On the server, change the iSCSI ID:
iscsi-iname -p SERVER_NAME, the obtained string is written in the file/etc/iscsi/initiatorname.iscsi - Restart iscsi (if it did not start because of “not fulfilled conditions”, it will be fine)
- Execute
iscsiadm --mode discovery --type sendtargets --portal STORAGE_IP --login(STORAGE_IP from Manage network). - Go to the storage interface, under Hosts/initiators, our host’s name should appear.
- In this same interface, create a “host”, specify the name, IP address, and in the list of initiators should be one with our iSCSI-ID, select it.
- On the storage, create luns or groups of luns (optional)
- Assign access to our host for created or previously existing groups of luns (or individual luns).
- On the server, execute
rescan-scsi-bus.shfrom sg3_utils, all luns should appear. - Create a configuration for multipath:
mpathconf --enable. - In most cases, the default configuration works. To exclude some luns/disks, write them in the section blacklist.
- Start the service: systemctl enable multipathd;
systemctl start multipathd - Now execute
multipath -lland see all devices from mapper-а (mpathXX)
If something went wrong:
- Logout from host:
iscsiadm -m node -u - Re-login:
iscsiadm --mode discovery --type sendtargets --portal STORAGE_IP --login