wiki:TipAndDoc/network/iscsi

iSCSI Enterprise Target

Ubuntu 10.04 Lucid and Windows XP

setup Ubuntu iSCSI target

  • mitty@ubuntu64:~$ sudo aptitude install iscsitarget
  • mitty@ubuntu64:~$ sudo vim /etc/default/iscsitarget
    ISCSITARGET_ENABLE=true
    
  • mitty@ubuntu64:~$ sudo vim /etc/ietd.conf
    @@ -108,3 +108,5 @@
            #Wthreads               8               # Number of IO threads
            #QueuedCommands         32              # Number of queued commands
    
    +Target iqn.2011-03.jp.mitty.local.ubuntu64:2008r2.disk
    +       Lun 0 Path=/dev/sdb,Type=blockio
    

check status

  • mitty@ubuntu64:~$ cat /proc/net/iet/session
    tid:1 name:iqn.2011-03.jp.mitty.local.ubuntu64:2008r2.disk
    
  • mitty@ubuntu64:~$ cat /proc/net/iet/volume
    tid:1 name:iqn.2011-03.jp.mitty.local.ubuntu64:2008r2.disk
            lun:0 state:0 iotype:blockio iomode:wt path:/dev/sdb
    
  • mitty@ubuntu64:~$ sudo netstat -nap --inet | grep iet
    tcp        0      0 0.0.0.0:3260            0.0.0.0:*               LISTEN      791/ietd
    

setup XP Initiator

  1. Discover iSCSI target
  2. Select target
  3. Log On to Target
  4. Ubuntu target and XP Initiator
  5. Format iSCSI disk
  6. Disk property

status of target

  • mitty@ubuntu64:~$ cat /proc/net/iet/session
    tid:1 name:iqn.2011-03.jp.mitty.local.ubuntu64:2008r2.disk
            sid:281475899523136 initiator:iqn.1991-05.com.microsoft:xp
                    cid:1 ip:192.168.234.136 state:active hd:none dd:none
    
  • mitty@ubuntu64:~$ sudo fdisk -lu /dev/sdb
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1              63    41929649    20964793+   7  HPFS/NTFS
    

error

  • wiki:TipAndDoc/service/sakura/ipv6 などで、非標準カーネル( linux-headers-generic-lts-backport-maverick linux-image-generic-lts-backport-maverick )を用いていると、以下のようにエラーとなる
    • uname -a
      Linux ubuntu64 2.6.35-23-generic #41~lucid1-Ubuntu SMP Thu Dec 2 22:27:43 UTC 2010 x86_64 GNU/Linux
      
    • iscsitarget
      Version: 1.4.19+svn275-ubuntu2
      
    • /var/log/syslog
      Mar 19 22:20:25 ubuntu64 ietd: can't create a target 2 0
      
    • $ sudo ietadm --op new --tid=0 --lun=0 --params Path=/dev/sdb
      Operation not permitted.
      
Last modified 5 years ago Last modified on Sep 28, 2012 10:41:55 AM

Attachments (6)

Download all attachments as: .zip