Tuesday, May 4, 2010

Setting up an iSCSI Target on Solaris 10

Provide a directory where the logical units will be stored (file based LUN's will be stored here)

iscsitadm modify admin -d /etc/iscsi

and turn on fast write ACK's:

iscsitadm modify admin -f enable

Obviously if you'd like to have the LUs stored elsewhere just supply a different directory.

Create a direct connection to a disk drive:

iscsitadm create target --type raw --backing-store /dev/dsk/c4t600A0B8000492E84000002914BDE738Ad0p0 mssql

Or just create a logical disk on top of a normal filesystem:

iscsitadm create target -z 20g mssql

"-z 20g" is the size of the iSCSI targetand "mssql" is the name of the iSCSI target. Now set the receive buffer size, to increase write speeds:

iscsitadm modify target --maxrecv 16777214 mssql

Enable discovery from a host running the Solaris initiator

iscsiadm add discovery-address 10.0.0.25
iscsiadm modify discovery -t enable

Test to see all is okay with "iscsitadm list target -v" :

root@Selenium-S10 - ~>iscsitadm list target -v
Target: mssql
iSCSI Name: iqn.1986-03.com.sun:02:b374a80a-816f-65e6-b0b8-babca7af2adc.mssql
Alias: MSSQL
MaxRecv: 16777214
Connections: 0
ACL list:
TPGT list:
TPGT: 1
LUN information:
LUN: 0
GUID: 010000144f1fd33800002a004bdf2651
VID: SUN
PID: SOLARIS
Type: disk
Size: 543G
Status: online

No comments:

Post a Comment