Fedora 20
Sponsored Link

Configure iSCSI Initiator
2013/12/26
 
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-12.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-12.world.srv:target00, portal: 10.0.0.30,3260] (multiple)
[  158.722047] scsi2 : iSCSI Initiator over TCP/IP
[  159.736626] scsi 2:0:0:0: RAID              IET      Controller       0001 PQ: 0 ANSI: 5
[  159.739700] scsi 2:0:0:0: Attached scsi generic sg0 type 12
Login to [iface: default, target: iqn.2013-12.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-12.world.srv:target00
# show partitions

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

major minor  #blocks  name

 252        0   31457280 vda
 252        1     512000 vda1
 252        2   30944256 vda2
 253        0    2113536 dm-0
 253        1   28827648 dm-1
   8        0    3145728 sda
# 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