The following procedure uses a simple NFS service.
See Creating a Basic ZFS Storage Pool in Managing ZFS File Systems in Oracle Solaris 11.2 for information about how to create a ZFS pool. See Creating a ZFS File System Hierarchy in Managing ZFS File Systems in Oracle Solaris 11.2 for information about how to create a ZFS file system in that ZFS pool.
The following command prints a list of registered resource types.
# clresourcetype list
# clresourcetype register SUNW.HAStoragePlus SUNW.nfs
# clresourcegroup create -p PathPrefix=path resource-group
# clreslogicalhostname create -g resource-group \ -h logical-hostname logicalhost-resource
# clresource create -g resource-group -t SUNW.HAStoragePlus \ -p Zpools=zpool HASP-resource
The resource is created in the enabled state.
The node on which the resource group is brought online becomes the primary node for the ZFS file system. The ZFS pool zpool is imported on this node. The ZFS file system is consequently mounted locally on this node.
# clresourcegroup online -M resource-group
The file dfstab.nfs-rs must be present in zpool/nfs/SUNW.nfs.
# clresource create -g resource-group -t SUNW.nfs \ -p resource_dependencies_offline_restart=HASP-resource NFS-resource
The resource is created in the enabled state.
# clresourcegroup online -M resource-group
The following example uses a simple NFS service. The example assumes the following:
The nfs/export directory exists in the ZFS pool /nfszpool.
The dfstab.resource file exists in the /nfszpool/nfs/SUNW.nfs directory.
The path-prefix directory is on the root directory of the same file system that is to be mounted, for example, /nfszpool/nfs. The path-prefix directory is the directory that HA-NFS uses to maintain administrative information and status information.
phys-schost-1% su Password: # clresourcetype list SUNW.LogicalHostname:2 SUNW.SharedAddress:2 # clresourcetype register SUNW.HAStoragePlus SUNW.nfs # clresourcegroup create -p PathPrefix=/nfszpool/nfs nfs-rg # clreslogicalhostname create -g nfs-rg -h log-nfs nfs-lh-rs # clresource create -g nfs-rg -t SUNW.HAStoragePlus \ -p Zpools=nfszpool nfs-hastp-rs # clresourcegroup online -M nfs-rg # clresource create -g nfs-rg -t SUNW.nfs \ -p resource_dependencies_offline_restart=nfs-hastp-rs nfs-rs