Site icon UnixArena

How to add ISCSI targets in Solaris-shared storage setup

This article explains about adding the ISCSI target on Solaris node.Once you installed the openfiler,you have to provision LUN to specific target in order to access  LUNS in operating system.Once its done,then we just need to add those targets in OS to see those disks.Here we will see, how to add the iscsi target in Solaris in details manner. 

Assumption:Here i have already provision lun1 & lun2 to specific target iqn.2006-01.com.openfiler:tsn.58533bc21b9e.

Login to Solaris host.
Enable the iscsi target service.

bash-3.00# svcadm enable iscsitgt
bash-3.00# svcs -a |grep iscsitgt
online 22:47:20 svc:/system/iscsitgt:default


Add the static target using the above mentioned target number.

# iscsiadm add static-config iqn.2006-01.com.openfiler:tsn.58533bc21b9e
,192.168.2.7:3260
Note:openfiler and Solaris host should be in same network in order to access the shared storage.
Openfiler IP:192.168.2.7 Default port:3260
Target:iqn.2006-01.com.openfiler:tsn.58533bc21b9e


Verify the target number
># iscsiadm list static-config
Static Configuration Target: iqn.2006-01.com.openfiler:tsn.58533bc21b9e,192.168.2.7:3260

Enable the discovery:

# iscsiadm modify discovery -s enable
Scan the LUN in OS side.
# devfsadm -i iscsi -v

# echo |format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@0,0/pci15ad,1976@10/sd@0,0
1. c2t2d0
/iscsi/disk@0000iqn.2006-01.com.openfiler%3Atsn.58533bc21b9e0001,0
2. c2t3d0
/iscsi/disk@0000iqn.2006-01.com.openfiler%3Atsn.58533bc21b9e0001,1
Specify disk (enter its number): Specify disk (enter its number):
# uname -a
SunOS node2 5.10 Generic_142910-17 i86pc i386 i86pc
#
Now your shared storage setup is ready.You can add multiple target for same LUNS and that will act as alternative path for those LUNS.So that we can practice multi-pathing as well.

Thank you for reading this article.Please leave a comment if you have any doubt ,i will get back to you as soon as possible.

Exit mobile version