Target 1: iqn.2011-02.com.smileserv:192.168.93.12
System information:
Driver: iscsi
State: ready
I_T nexus information:
I_T nexus: 30
Initiator: iqn.2011-02.com.smileserv:192.168.86.12
Connection: 0
IP Address: 192.168.86.12
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000
SCSI SN: beaf10
Size: 0 MB
Online: Yes
Removable media: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 10486 MB
Online: Yes
Removable media: No
Backing store type: rdwr
Backing store path: /PATH/IMAGE/192.168.86.12_CentOS-5.X_i386_APM_8Thread.img
Backing store flags:
Account information:
ACL information:
192.168.86.12
Target 101: iqn.2011-02.com.smileserv:192.168.20.7
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00650000
SCSI SN: beaf1010
Size: 0 MB
Online: Yes
Removable media: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00650001
SCSI SN: beaf1011
Size: 31457 MB
Online: Yes
Removable media: No
Backing store type: rdwr
Backing store path: /PATH/IMAGE/Sample_30G_CentOS_5_64.img_1
Backing store flags:
Account information:
ACL information:
192.168.86.12
[root@localhost ~]# iscsiadm -m discovery -t sendtargets -p 192.168.20.4
192.168.20.4:3260,1 iqn.2011-02.com.smileserv:192.168.93.12
192.168.20.4:3260,1 iqn.2011-02.com.smileserv:192.168.20.7
[root@localhost by-path]# pwd
/dev/disk/by-path
[root@localhost by-path]# ls -l
lrwxrwxrwx 1 root root 9 4¿ù 29 11:16 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.93.12-lun-1 -> ../../sda
lrwxrwxrwx 1 root root 10 4¿ù 29 11:16 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.93.12-lun-1-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 4¿ù 29 11:16 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.93.12-lun-1-part2 -> ../../sda2
lrwxrwxrwx 1 root root 9 4¿ù 29 11:16 pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sdb
[root@localhost ~]# iscsiadm -m node -T iqn.2011-02.com.smileserv:192.168.20.7 -p 192.168.20.4:3260 -l
Logging in to [iface: default, target: iqn.2011-02.com.smileserv:192.168.20.7, portal: 192.168.20.4,3260]
Login to [iface: default, target: iqn.2011-02.com.smileserv:192.168.20.7, portal: 192.168.20.4,3260] successful.
[root@localhost by-path]# ls -l
lrwxrwxrwx 1 root root 9 5¿ù 8 10:52 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.20.7-lun-1 -> ../../sdc
lrwxrwxrwx 1 root root 10 5¿ù 8 10:52 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.20.7-lun-1-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 5¿ù 8 10:52 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.20.7-lun-1-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 9 4¿ù 29 11:16 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.93.12-lun-1 -> ../../sda
lrwxrwxrwx 1 root root 10 4¿ù 29 11:16 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.93.12-lun-1-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 4¿ù 29 11:16 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.93.12-lun-1-part2 -> ../../sda2
lrwxrwxrwx 1 root root 9 4¿ù 29 11:16 pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sdb
# tgtadmin Ãß°¡
/usr/sbin/tgtadm --lld iscsi --op new --mode target --tid 100 -T iqn.2011-02.com.smileserv:192.168.20.6
/usr/sbin/tgtadm --lld iscsi --op new --mode logicalunit --tid 100 --lun 1 -b /CLOUD_R/ING_IMAGE/Sample_30G_CentOS_5_64.img
/usr/sbin/tgtadm --lld iscsi --op bind --mode target --tid 100 -I 192.168.86.12
# target ¸®½ºÆ® ¿Ã¶ó¿Â°Å È®ÀÎ
[root@localhost by-path]# iscsiadm -m discovery -t sendtargets -p 192.168.20.4
192.168.20.4:3260,1 iqn.2011-02.com.smileserv:192.168.93.12
192.168.20.4:3260,1 iqn.2011-02.com.smileserv:192.168.20.7
192.168.20.4:3260,1 iqn.2011-02.com.smileserv:192.168.20.6
# ·Î±×ÀÎ
[root@localhost by-path]# iscsiadm -m node -T iqn.2011-02.com.smileserv:192.168.20.6 -p 192.168.20.4:3260 -l
Logging in to [iface: default, target: iqn.2011-02.com.smileserv:192.168.20.6, portal: 192.168.20.4,3260]
Login to [iface: default, target: iqn.2011-02.com.smileserv:192.168.20.6, portal: 192.168.20.4,3260] successful.
[root@localhost by-path]# ls -l
ÇÕ°è 0
lrwxrwxrwx 1 root root 9 5¿ù 8 11:00 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.20.6-lun-1 -> ../../sdd
lrwxrwxrwx 1 root root 10 5¿ù 8 11:00 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.20.6-lun-1-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 5¿ù 8 11:00 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.20.6-lun-1-part2 -> ../../sdd2
lrwxrwxrwx 1 root root 9 5¿ù 8 10:52 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.20.7-lun-1 -> ../../sdc
lrwxrwxrwx 1 root root 10 5¿ù 8 10:52 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.20.7-lun-1-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 5¿ù 8 10:52 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.20.7-lun-1-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 9 4¿ù 29 11:16 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.93.12-lun-1 -> ../../sda
lrwxrwxrwx 1 root root 10 4¿ù 29 11:16 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.93.12-lun-1-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 4¿ù 29 11:16 ip-192.168.20.4:3260-iscsi-iqn.2011-02.com.smileserv:192.168.93.12-lun-1-part2 -> ../../sda2
lrwxrwxrwx 1 root root 9 4¿ù 29 11:16 pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sdb
### »èÁ¦ ##
# tgtadm »èÁ¦
[root@localhost by-path]# iscsiadm -m node -T iqn.2011-02.com.smileserv:192.168.20.6 -p 192.168.20.4:3260 --logout
Logging out of session [sid: 3, target: iqn.2011-02.com.smileserv:192.168.20.6, portal: 192.168.20.4,3260]
Logout of [sid: 3, target: iqn.2011-02.com.smileserv:192.168.20.6, portal: 192.168.20.4,3260] successful.
-m --mode
-T --target
-p --portal
-I --login
-u, --logout