DevTech101

DevTech101

Below are the steps needed to create an NFS resource in Oracle Solaris Cluster (formerly known Sun Cluster)

The exmaple below uses two file system /fs1 and fs2, that will fail-over on a 4 node cluster.

#!/bin/sh

# Note: Run this on the node that is the metaset owner (most times filer1)
# --------------------------------------------------
echo CREATING /fs1 Resource Group and resources
# ==================================================
 
clresourcetype register SUNW.HAStoragePlus
clresourcegroup create -p PathPrefix=/fs1 -p Nodelist=filer1,filer2,filer3,filer4 nfs-fs1-rg
clreslogicalhostname create -g nfs-fs1-rg -h vip-fs1 nfs-vip-fs1-rs
clresource create -g nfs-fs1-rg -t SUNW.HAStoragePlus -p FilesystemMountPoints=/fs1 -p AffinityOn=True nfs-has-fs1-rs 
clresourcegroup online -M nfs-fs1-rg
clresource create -g nfs-fs1-rg -t SUNW.nfs -p Resource_dependencies=nfs-has-fs1-rs nfs-fs1-rs
clresourcegroup offline nfs-fs1-rg
clresourcegroup online -M nfs-fs1-rg
 
# --------------------------------------------------
echo CREATING /fs2 Resource Group and resources
# ===================================================
clresourcetype register SUNW.HAStoragePlus
clresourcegroup create -p PathPrefix=/fs2 -p Nodelist=filer1,filer2,filer3,filer4 nfs-fs2-rg
clreslogicalhostname create -g nfs-fs2-rg -h vip-fs2 nfs-vip-fs2-rs
clresource create -g nfs-fs2-rg -t SUNW.HAStoragePlus -p FilesystemMountPoints=/fs2 -p AffinityOn=True nfs-has-fs2-rs
clresourcegroup online -M nfs-fs2-rg
clresource create -g nfs-fs2-rg -t SUNW.nfs -p Resource_dependencies=nfs-has-fs2-rs nfs-fs2-rs
clresourcegroup offline nfs-fs2-rg
clresourcegroup online -M nfs-fs2-rg
# ==================================================
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
%d bloggers like this: