Setup iSCSI Initiator

This article is for Debian Squeeze.

Install required package

apt-get install open-iscsi

Configuration

Edit file /etc/iscsi/initiatorname.iscsi to set your name, example:

InitiatorName=iqn.2010-07.com.example:node1

Connection

Import target devices into database:

iscsiadm --mode discovery --type sendtargets --portal 192.168.0.131

Database will be updated as:

/etc/iscsi/
├── ifaces
├── initiatorname.iscsi
├── iscsid.conf
├── nodes
│   └── iqn.2010-08.com.example:storage.disk
│       └── 192.168.0.131,3260,1
│           └── default
│           
└── send_targets
    ├── 192.168.0.131,3260
    │   ├── iqn.2010-08.com.example:storage.disk,192.168.0.131,3260,1,default -> /etc/iscsi/nodes/iqn.2010-08.com.example:storage.disk/192.168.0.131,3260,1
    │   └── st_config

Connect (login) to the target

iscsiadm -m node -T iqn.2010-08.com.example:san1.disk -l

The disk is connected as /dev/sda. Sample dmesg output:

scsi1 : iSCSI Initiator over TCP/IP
  Vendor: IET       Model: Controller        Rev: 0001
  Type:   RAID                               ANSI SCSI revision: 05
  Vendor: IET       Model: VIRTUAL-DISK      Rev: 0001
  Type:   Direct-Access                      ANSI SCSI revision: 05
SCSI device sda: 4194104 512-byte hdwr sectors (2147 MB)
sda: Write Protect is off
sda: Mode Sense: 79 00 00 08
SCSI device sda: drive cache: write back
SCSI device sda: 4194104 512-byte hdwr sectors (2147 MB)
sda: Write Protect is off
sda: Mode Sense: 79 00 00 08
scsi 1:0:0:0: Attached scsi generic sg0 type 12
SCSI device sda: drive cache: write back
 sda: sda1
sd 1:0:0:1: Attached scsi disk sda
sd 1:0:0:1: Attached scsi generic sg1 type 0

tips/setup_iscsi_initiator.txt · Last modified: 2010-08-31 12:16 by admin
Back to top
GNU Free Documentation License 1.3
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0