ISCSI server ( SAN ) port : 3260

ISCSI server ( SAN ) port : 3260

nternet small computer systme interface. The protocal allow clients [ initiator ] to send SCSI command to SCSI storage devices [ target ] on remote servers. It is storage area network protocol.
Disk partition is exported as LUN via fibre optic channel or iscsi channel.

for iscsi , LAN card required Gpxi support

eg.
4GB space of machine 192.168.122.10 ( target ) shared with 192.168.122.1 (initiator )

================================================================================================
configure the ISCSI server :

1> create partition to share
#cfdisk /dev/sda

2> #partx -a /dev/sda

3> install iscsi package
# yum install scsi-target-utils

4> vim /etc/tgt/target.conf
<target iqn.2015-01.com.skynet:server.target1 >   —— [ iqn_name(iqn.date_of_creation.any_name):target_name ]
backing-store /dev/sda16
initiator-address 192.168.122.10 –client IP

</target>

:wq

5># service tgtd restart

6># chkconfig tgtd on

Recheck
# tgt-admin -s => show shared partition LUN

================================================================================================
client side settings.

1># yum install iscsi-initiator-utils

2># iscsiadm -m discovery -t st -p 192.168.122.10  => -m (mode), -t(Type), st(send target), -p (portal)
copy the IQN generated by this. iqn.2015-01.com.skynet:server.target1

3># iscsiadm -m node -T iqn.2015-01.com.skynet:server.target1 -p 192.168.122.10 -l  =====> l(login)

[ logs generated in #dmesg ]

Recheck using #fdisk -l

note : during this process new paration is attached as secondary HDD eg sdb

=================================================================================================
create partition on LUN

1> #cfdisk /dev/sdb

2> #partx -a /dev/sdb

3> #mkfs.ext4 /dev/sdb6

4> #mkdir /iscsi

5> #mount /dev/sdb6 /iscis

6> #vim /etc/fstab

/dev/sdb6 /iscsi ext4 defaults,_netdev 0 0

—> netdev ( call booting time network drive )

:wq

7> #mount -a

Recheck #df -hT

===============================================================================================

EXtra :

1> database path or configuration directory
# cd /var/lib/iscsi

2> show target block in configuration file
#tgt-admin –dump

3>initiator name
#vi /etc/iscsi/initiatorname.iscsi

4> Disconnect partition.
#iscsiadm -m node -T iqn.2015-01.com.skynet:server.target1 -p 192.168.122.10 -u ==> u{logout}

5> Delete partition from client machine.
#iscsiadm -m node -T iqn.2015-01.com.skynet:server.target1  -p 192.168.122.10 -o delete

Recheck
#iscsiadm -m node -T iqn.2015-01.com.skynet:server.target1 -p 192.168.122.10
result iscsiadm: No records found.

6> You can install OS on this partition if your LAN card support such technologies.

==============================================================================================

Posted in servers

Leave a Reply