Fedora 19
Sponsored Link

Configure iSCSI Initiator2013/07/04

 
Configure iSCSI Initiator. This example is based on the environment below.
 
dlp.srv.world
[10.0.0.30] - iSCSI Target

 
www.srv.world
[10.0.0.31] - iSCSI Initiator
[1] Configure iSCSI Initiator
[root@www ~]#
yum -y install iscsi-initiator-utils
[root@www ~]#
vi /etc/iscsi/iscsid.conf
# line 53: uncomment

node.session.auth.authmethod = CHAP
# line 57,58: uncomment and set username and password which set on iSCSI Target

node.session.auth.username =
username

node.session.auth.password =
password
[root@www ~]#
systemctl start iscsid.service

[root@www ~]#
systemctl enable iscsid.service
# discover target

[root@www ~]#
iscsiadm -m discovery -t sendtargets -p 10.0.0.30

10.0.0.30:3260,1 iqn.2013-07.world.srv:target00

# make sure status after discovery

[root@www ~]#
iscsiadm -m node -o show

# BEGIN RECORD 6.2.0.873-1
node.name = iqn.2013-07.world.srv:target00
node.tpgt = 1
node.startup = automatic
node.leading_login = No
iface.hwaddress = <empty>
iface.ipaddress = <empty>
iface.iscsi_ifacename = default
iface.net_ifacename = <empty>
iface.transport_name = tcp
...
...
# END RECORD

# login to target

[root@www ~]#
iscsiadm -m node --login

Logging in to [iface: default, target: iqn.2013-07.world.srv:target00, portal: 10.0.0.30,3260] (multiple)
[ 1179.512093] scsi2 : iSCSI Initiator over TCP/IP
[ 1180.521816] scsi 2:0:0:0: RAID              IET      Controller       0001 PQ: 0 ANSI: 5
[ 1180.523072] scsi 2:0:0:0: Attached scsi generic sg0 type 12
[ 1180.527143] scsi 2:0:0:1: Direct-Access     IET      VIRTUAL-DISK     0001 PQ: 0 ANSI: 5
[ 1180.529998] sd 2:0:0:1: Attached scsi generic sg1 type 0
[ 1180.531146] sd 2:0:0:1: [sda] 16777216 512-byte logical blocks: (8.58 GB/8.00 GiB)
Login to [iface: default, target: iqn.2013-07.world.srv:target00, portal: 10.0.0.30,3260] successful.

# show current session

[root@www ~]#
iscsiadm -m session -o show

tcp: [1] 10.0.0.30:3260,1 iqn.2013-07.world.srv:target00
# show partitions

[root@www ~]#
cat /proc/partitions

major minor  #blocks  name

 252        0   20971520 vda
 252        1     512000 vda1
 252        2   20458496 vda2
 253        0    4128768 dm-0
 253        1   16326656 dm-1
   8        0    8388608 sda
   8        1    8387584 sda1
# added new device "sda*" provided from target
[2]
Complete to configure iSCSI Initiator. It's possible to use the provided device from iSCSI Target as a local device.

Matched Content