DirectAdmin / iscsi commands and important paths

  • Sunny
  • 3578 Views
  • 0 Comment
  • No tags

iscsi commands

 

01. To install iscsi-initiator

yum install iscsi-initiator-utils

02. To find out InitiatorName

cat /etc/iscsi/initiatorname.iscsi

03. To discover all available targets

iscsiadm -m discovery -t sendtargets -p XX.XX.XXX.XX

04. To discover all available targets with verbosity

iscsiadm -d 2 -m discovery -t sendtargets -p XX.XX.XXX.XX

Note: We can increase verbosity by increasing the value giving to “-d” switch

05. To check the available iSCSI node(s) to connect [in other words, to make sessions]

iscsiadm -m node

06. To see active sessions

iscsiadm -m session

07. To login a session with mutual CHAP authentication

iscsiadm -m node -T iqn.2006-06.com.qnap:xx-YYYx:iscsi.yXXX.yXyXxY -o update -n node.session.auth.authmethod -v CHAP
iscsiadm -m node -T iqn.2006-06.com.qnap:xx-YYYx:iscsi.yXXX.yXyXxY -o update -n node.session.auth.username -v initiatorusername
iscsiadm -m node -T iqn.2006-06.com.qnap:xx-YYYx:iscsi.yXXX.yXyXxY -o update -n node.session.auth.password -v sv0+XgpE46TB
iscsiadm -m node -T iqn.2006-06.com.qnap:xx-YYYx:iscsi.yXXX.yXyXxY -o update -n node.session.auth.username_in -v targetusername
iscsiadm -m node -T iqn.2006-06.com.qnap:xx-YYYx:iscsi.yXXX.yXyXxY -o update -n node.session.auth.password_in -v B/J1nSaWbvIt
iscsiadm -m node -T iqn.2006-06.com.qnap:xx-YYYx:iscsi.yXXX.yXyXxY -p XX.XX.XX.XX --login

08. To logout a particular session

iscsiadm -m session --logout iqn.2006-06.com.qnap:xx-YYYx:iscsi.yXXX.yXyXxY

09. To logout all sessions

iscsiadm -m node --logout all

10. To delete a target

iscsiadm -m node --op delete --targetname iqn.2006-06.com.qnap:xx-YYYx:iscsi.yXXX.yXyXxY

11. Important paths

/var/lib/iscsi/
/etc/iscsi/

12. Mounting iSCSI drives.

a. Create partition on logged in iSCSI drive
b. Create file system on it.
c. Mount the partition with “_netdev” option via fstab

 

0 Comments
Leave a comment
OUR SERVICES
OUR TECHNOLOGIES