- pkg install group/feature/storage-server
- svcadm enable stmf
Backup current configuration
- svccfg export -a stmf >/var/tmp/COMSTAR
If needed restore configuration
- svccfg import /var/tmp/COMSTAR
Create a new lun
- zfs create -V 2g rpool/vol1
- stmfadm create-lu /dev/zvol/rdsk/rpool/vol1
- stmfadm list-lu ; to get name of new lun id
Create a host group who are allowed to connect to the new lun (opional)
- stmfadm create-hg tx-nfs
Add members:
- stmfadm add-hg-member -g tx-nfs iqn.1986-03.com.sun:node1
- stmfadm add-hg-member -g tx-nfs iqn.1986-03.com.sun:node2
Create a view for the new lun, including access for the new host group
- stmfadm add-view -n 10 -h tx-nfs 600144F0D2D88F0000004F3BF9E30001
* -n 10 ; defines the lun number (optional)
* -h tx-nfs ; defines the host group to allow access (optional)
* -t ??? ; defines an optional target group
Enable iscsi target
- svcadm enable -r svc:/network/iscsi/target:default
Create iscsi targete
- itadm create-target -n iqn.1986-03.com.sun:iscsi01 -l iscsi01
* -n ; an optional name for the iqn
* -l ; optional alias for the iqn
Test the new target using automatic discovery from the same or other server:
* Define a readable iqn name, and alias for the current server
- iscsiadm modify initiator-node -A iscsi01 -N iqn.1986-03.com.sun:node1
* Enable static discovery
- iscsiadm modify discovery -s enable
* Add a static configuration for the new lun
- iscsiadm add static-config iqn.1986-03.com.sun:iscsi01,10.0.1.51
* Look for new luns using devfsadm
- devfsadm -i iscsi
Verify the new lun:
- echo | format ; look for a lun named SUN-COMSTAR
- iscsiadm list target -S
Make a zfs pool on the new disk
* If the system is running on AMD/Intel (x86), fdisk the disk with a solaris partition
- echo | format
- identifiy the new disk; look for SUN-COMSTAR
- fdisk -B c0t600144F0EA3E8C0000004F3BBA1C0001d0p0 # Add p0 to the end of the name
* Create the zpool
- zpool create newpool c0t600144F0EA3E8C0000004F3BBA1C0001d0