| | 9 | |
| | 10 | = iSCSI Enterprise Target = |
| | 11 | == Ubuntu 10.04 Lucid and Windows XP == |
| | 12 | === setup Ubuntu iSCSI target === |
| | 13 | * mitty@ubuntu64:~$ sudo aptitude install iscsitarget |
| | 14 | * mitty@ubuntu64:~$ sudo vim /etc/default/iscsitarget |
| | 15 | {{{ |
| | 16 | ISCSITARGET_ENABLE=true |
| | 17 | }}} |
| | 18 | * mitty@ubuntu64:~$ sudo vim /etc/ietd.conf |
| | 19 | {{{ |
| | 20 | @@ -108,3 +108,5 @@ |
| | 21 | #Wthreads 8 # Number of IO threads |
| | 22 | #QueuedCommands 32 # Number of queued commands |
| | 23 | |
| | 24 | +Target iqn.2011-03.jp.mitty.local.ubuntu64:2008r2.disk |
| | 25 | + Lun 0 Path=/dev/sdb,Type=blockio |
| | 26 | }}} |
| | 27 | |
| | 28 | === check status === |
| | 29 | * mitty@ubuntu64:~$ cat /proc/net/iet/session |
| | 30 | {{{ |
| | 31 | tid:1 name:iqn.2011-03.jp.mitty.local.ubuntu64:2008r2.disk |
| | 32 | }}} |
| | 33 | * mitty@ubuntu64:~$ cat /proc/net/iet/volume |
| | 34 | {{{ |
| | 35 | tid:1 name:iqn.2011-03.jp.mitty.local.ubuntu64:2008r2.disk |
| | 36 | lun:0 state:0 iotype:blockio iomode:wt path:/dev/sdb |
| | 37 | }}} |
| | 38 | |
| | 39 | * mitty@ubuntu64:~$ sudo netstat -nap --inet | grep iet |
| | 40 | {{{ |
| | 41 | tcp 0 0 0.0.0.0:3260 0.0.0.0:* LISTEN 791/ietd |
| | 42 | }}} |
| | 43 | |
| | 44 | === setup XP Initiator === |
| | 45 | * [http://go.microsoft.com/fwlink/?LinkId=33817 Microsoft iSCSI Software Initiator] からDL |
| | 46 | |
| | 47 | 1. Discover iSCSI target[[br]][[Image(iscsi-target-01-Discovery.png,33%)]] |
| | 48 | 1. Select target[[br]][[Image(iscsi-target-02-Targets.png,33%)]] |
| | 49 | 1. Log On to Target[[br]][[Image(iscsi-target-03-LogOn.png,33%)]] |
| | 50 | 1. Ubuntu target and XP Initiator[[br]][[Image(iscsi-target-04.png,33%)]] |
| | 51 | 1. Format iSCSI disk[[br]][[Image(iscsi-target-05-NTFS.png,33%)]] |
| | 52 | 1. Disk property[[br]][[Image(iscsi-target-06-NTFS-property.png,33%)]] |
| | 53 | |
| | 54 | === status of target === |
| | 55 | * mitty@ubuntu64:~$ cat /proc/net/iet/session |
| | 56 | {{{ |
| | 57 | tid:1 name:iqn.2011-03.jp.mitty.local.ubuntu64:2008r2.disk |
| | 58 | sid:281475899523136 initiator:iqn.1991-05.com.microsoft:xp |
| | 59 | cid:1 ip:192.168.234.136 state:active hd:none dd:none |
| | 60 | }}} |
| | 61 | |
| | 62 | * mitty@ubuntu64:~$ sudo fdisk -lu /dev/sdb |
| | 63 | {{{ |
| | 64 | |
| | 65 | Device Boot Start End Blocks Id System |
| | 66 | /dev/sdb1 63 41929649 20964793+ 7 HPFS/NTFS |
| | 67 | }}} |