Debug Size:

7 - Pool Services


ZFS zvols can be used to create shares using NFS, CIFS/SMB, iSCSI or Fibre Channel.

The following shows how to create a simple share with both NFS and SMB:
# zfs create POOLA/vol1
# zfs set sharesmb=on POOLA/vol1
# zfs set sharenfs=on POOLA/vol1
As the ZFS properties are being used to create the shares, nothing else needs to be done to enable failover of the shares.

The following shows how to create a COMSTAR LU and expose it to clients using iSCSI. Note that RSF-1 handles failover of the LU and views, but you will need to ensure any host groups, target groups, target portal groups and targets are identical on both nodes. The groups are optional depending on your needs, but if used, they must be identical on both nodes. Assume POOLA service is running on romulus, stopped on remus:
NOTE – The following commands need to be executed on both nodes (as shown).
Create TPG for VIP (sales_staff-public = 192.168.33.105):
root@romulus:~# itadm create-tpg poola-tpg 192.168.33.105
root@remus:~# itadm create-tpg poola-tpg 192.168.33.105
Create target using TPG:
root@romulus:~# itadm create-target -t poola-tpg
Target iqn.1986-03.com.sun:02:af94b9da-6905-e22a-f5ed-981dbd97c5c6 successfully created
root@remus:~# itadm create-target -t poola-tpg -n iqn.1986-03.com.sun:02:af94b9da-6905-e22a-f5ed-981dbd97c5c6
Target iqn.1986-03.com.sun:02:af94b9da-6905-e22a-f5ed-981dbd97c5c6 successfully created
NOTE – The following commands manipulate the ZFS pools and so only need to be executed on the node that has the pool imported.
Create ZFS volume to be shared:
root@romulus:~# zfs create -V 1G POOLA/vol1
Create LU:
root@romulus:~# stmfadm create-lu /dev/zvol/rdsk/POOLA/vol01
Logical unit created: 600144F08C1BC4000000546F44110001
Create view
root@romulus:~# stmfadm add-view 600144F08C1BC4000000546F44110001
root@romulus:~#
root@romulus:~# stmfadm list-view -l 600144F08C1BC4000000546F44110001
View Entry: 0
Host group : All
Target group : All
LUN : 0
Back up view information for RSF-1 failover:
root@romulus:~# stmfha backup POOLA
root@romulus:~# ls -l /POOLA/.mapping/
total 3
-rw------- 1 root root 44 2014-11-21 13:59 @@RAN475204875@@POOLA@-vol01
-rw-r--r-- 1 root root 11 2014-11-21 13:59 tidyUpFile495739573966393
-rw-r--r-- 1 root root 0 2014-11-21 13:59 timeOfCreation68366902028957
root@romulus:~# cat /POOLA/.mapping/@@RAN475204875@@POOLA@-vol01
BeginMap
index=0
TG=All
HG=All
LUN=0
EndMap
NOTE - Any clients should always connect to the VIP address for the HA service, rather than the fixed IP address of either of the servers
Prev Page
Next Page