Wednesday, December 08, 2010

iSCSI target

Install and enable COMSTAR
# pkg install storage-server
# svcadm enable stmf
 
Create volume for the target. Size is required.
# zfs create -V 500g tank/iscsi1
 
Create LUN 
# stmfadm create-lu /dev/zvol/rdsk/tank/iscsi1 
# stmfadm list-lu 
LU Name: 600144F0544C880000004CFF6DFE0001
 
Publish LUN to all hosts (to make our life easier for now)
# stmfadm add-view 600144F0544C880000004CFF6DFE0001
# stmfadm list-view -l 600144F0544C880000004CFF6DFE0001
View Entry: 0
    Host group   : All
    Target group : All
    LUN          : 0 
 
 
Start the service  (ignore the warning)
# svcadm enable -r svc:/network/iscsi/target:default
svcadm: svc:/milestone/network depends on svc:/network/physical, which has multiple instances.

# svcs -l iscsi/target (to test)

Create the target
# itadm create-target
Target iqn.1986-03.com.sun:02:08739864-69d3-cb63-c4be-c1b2b03d83b3 successfully created



# itadm list-target -v (to test)



0 Comments:

Post a Comment

<< Home