Connecting ISCSI bock device from Solaris

May 24, 2016 10:53 AM

.___ .________._______ .________.___
: __||    ___/:_.  ___\|    ___/: __|
| : ||___    \|  : |/\ |___    \| : |
|   ||       /|    /  \|       /|   |
|   ||__:___/ |. _____/|__:___/ |   |
|___|   :      :/         :     |___|
               :                    


I have shared a 8 GB LUN as ISCSI block with ISCSI target is iqn.2016-05.org.freenas.ctl, I am using freenas. I am configured a freenas address at 192.168.100.131 with default port 3260. For initiator, I am allow all initiator connection and all authorized network. There was no CHAP authentication for the ISCSI connection, so everyone can connect over network connection.
Open solaris box, check network connection with ping to 192.168.100.131.

Check disk attacked:

bash-3.2# echo | format
Searching for disks...
Inquiry failed for this logical diskdone


AVAILABLE DISK SELECTIONS:
       0. c0d0 <▒x▒▒▒▒▒▒▒▒▒@▒▒▒ cyl 6524 alt 2 hd 255 sec 63>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0

bash-3.2# ping 192.168.100.131
192.168.100.131 is alive

Modify configuration of ISCSI static discovery to enable :

bash-3.2# iscsiadm modify discovery -s enable

Modify ISCSI send target discovery to enable :

bash-3.2# iscsiadm modify discovery -t enable

Check discovery address from founded ISCSI target :

bash-3.2# iscsiadm list discovery-address
Discovery Address: 192.168.100.131:3260

Add it to ISCSI static configuration with format bellow :

# iscsiadm add static-config

bash-3.2# iscsiadm add static-config iqn.2016-05.org.freenas.ctl,192.168.100.131:3260

Scan all available LUNs from the ISCSI connection target :

bash-3.2# devfsadm -i iscsi -v

Then check that LUN has attached from ISCSI connection :

bash-3.2# echo | format
Searching for disks...
Inquiry failed for this logical diskdone


AVAILABLE DISK SELECTIONS:
       0. c0d0 <▒x▒▒▒▒▒▒▒▒▒@▒▒▒ cyl 6524 alt 2 hd 255 sec 63>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
       1. c3t6589CFC0000005D031823E839C658847d0           Disk-0123 cyl 1021 alt 2 hd 128 sec 32>
          /scsi_vhci/disk@g6589cfc0000005d031823e839c658847
Specify disk (enter its number): Specify disk (enter its number):

The disk of c3t6589CFC0000005D031823E839C658847d0 is from ISCSI connection.

#EOF

0 comments:

Article list :