Put the target_ip_address to local database : 스토리지를 연결하여 발급된 iqn을 가지고 스토리지에서 할당된 정보를 가져옴
# iscsiadm -m discovery -t sendtargets -p <target_ip_address>
211.110.XXX.XXX:3260,1 iqn.2001-04.com.example:storage.disk2.amiens.sys1.xy |
login to target and attach all exported luns:
# iscsiadm -m node --loginall all |
To get target list, run: 타겟리스트 확인
# iscsiadm -m discovery 211.110.XXX.XXX:3260 via sendtargets 211.110.XXX.XXX:3260 via sendtargets |
To get the node list, run: discovery 된 내용 확인
# iscsiadm -m node 211.110.XXX.XXX:3260,1 iqn.2001-04.com.example:storage.disk2.amiens.sys1.xyz |
The iscsid daemon opens a TCP session with the target . To check the open session, run:
# iscsiadm -m session or
# netstat -tpan | grep iscsid
or check /sys/class/iscsi_session |
Find which session a disk belongs to:
The output will include active sessions and attached scsi disks.
Remove Target
To logut from a target:
# iscsiadm -m node -u <ip address> |
To delete a target::
# iscsiadm -m node -o delete <ip address> |