Hi Gaurav,
I use the nfsrestart resource. As recomended I've one parallel group NFS:
group NFS (
SystemList = { vcs-1-node-1 = 0, vcs-1-node-2 = 1 }
Parallel = 1
AutoStartList = { vcs-1-node-2, vcs-1-node-1 }
)
NFS NFS_NFS (
Nproc = 64
NFSv4Support = 1
)
NIC NFS_NIC (
Device = bond0
Mii = 0
NetworkHosts = { "10.10.0.1" }
)
Phantom NFS_Phantom (
)
Share NFS_Share_root (
PathName = "/cluster/nfs"
Client = "10.10.0.0/24"
OtherClients = { "10.10.1.0/24" }
Options = "ro, fsid=0"
NFSRes = NFS_NFS
)
NFS_Share_root requires NFS_NFS
// resource dependency tree
//
// group NFS
// {
// NIC NFS_NIC
// Phantom NFS_Phantom
// Share NFS_Share_root
// {
// NFS NFS_NFS
// }
// }
and multiple NFS-Service Groups that do mounting and exporting via NFS. Here for example NFS-Service1:
group NFS-Service1 (
SystemList = { vcs-1-node-1 = 0, vcs-1-node-2 = 1 }
AutoStartList = { vcs-1-node-2, vcs-1-node-1 }
PreOnline @vcs-1-node-1 = 1
PreOnline @vcs-1-node-2 = 1
)
DiskGroup NFS-Service1_DiskGroup_DiskGroup_nfs1 (
DiskGroup = DiskGroup_nfs1
)
IP NFS-Service1_IP_10-10-0-12 (
Device = bond0
Address = "10.10.0.12"
NetMask = "255.255.255.224"
)
Mount NFS-Service1_Mount_Volume_cust_471102 (
MountPoint = "/cluster/nfs/471102"
BlockDevice = "/dev/vx/dsk/DiskGroup_nfs1/Volume_cust_471102"
FSType = vxfs
FsckOpt = "-y"
)
Mount NFS-Service1_Mount_Volume_dummy-nfs1 (
MountPoint = "/cluster/nfs/dummy-nfs1"
BlockDevice = "/dev/vx/dsk/DiskGroup_nfs1/Volume_dummy-nfs1"
FSType = vxfs
FsckOpt = "-y"
)
Mount NFS-Service1_Mount_Volume_lock (
MountPoint = "/cluster/nfs/lock-nfs1"
BlockDevice = "/dev/vx/dsk/DiskGroup_nfs1/Volume_lock"
FSType = vxfs
FsckOpt = "-y"
)
NFSRestart NFS-Service1_NFSRestart_NFSRestart (
NFSRes = NFS_NFS
LocksPathName = "/cluster/nfs/lock-nfs1"
NFSLockFailover = 1
)
Proxy NFS-Service1_Proxy_NFS (
TargetResName = NFS_NFS
)
Proxy NFS-Service1_Proxy_NIC (
TargetResName = NFS_NIC
)
Share NFS-Service1_Share_cust_471102-0 (
PathName = "/cluster/nfs/471102"
OtherClients = { "10.10.1.184/29" }
Options = "rw,no_root_squash,nohide"
NFSRes = NFS_NFS
)
Share NFS-Service1_Share_dummy-nfs1 (
PathName = "/cluster/nfs/dummy-nfs1"
Client = "10.10.0.0/16"
Options = "ro,no_root_squash,nohide"
NFSRes = NFS_NFS
)
Volume NFS-Service1_Volume_Volume_cust_471102 (
DiskGroup = DiskGroup_nfs1
Volume = Volume_cust_471102
)
Volume NFS-Service1_Volume_Volume_dummy-nfs1 (
DiskGroup = DiskGroup_nfs1
Volume = Volume_dummy-nfs1
)
Volume NFS-Service1_Volume_Volume_lock (
DiskGroup = DiskGroup_nfs1
Volume = Volume_lock
)
requires group NFS online local firm
NFS-Service1_IP_10-10-0-12 requires NFS-Service1_Proxy_NIC
NFS-Service1_IP_10-10-0-12 requires NFS-Service1_Share_cust_471102-0
NFS-Service1_IP_10-10-0-12 requires NFS-Service1_Share_dummy-nfs1
NFS-Service1_Mount_Volume_cust_471102 requires NFS-Service1_Volume_Volume_cust_471102
NFS-Service1_Mount_Volume_dummy-nfs1 requires NFS-Service1_Volume_Volume_dummy-nfs1
NFS-Service1_Mount_Volume_lock requires NFS-Service1_Volume_Volume_lock
NFS-Service1_NFSRestart_NFSRestart requires NFS-Service1_IP_10-10-0-12
NFS-Service1_NFSRestart_NFSRestart requires NFS-Service1_Mount_Volume_lock
NFS-Service1_Share_cust_471102-0 requires NFS-Service1_Mount_Volume_cust_471102
NFS-Service1_Share_cust_471102-0 requires NFS-Service1_Proxy_NFS
NFS-Service1_Share_dummy-nfs1 requires NFS-Service1_Mount_Volume_dummy-nfs1
NFS-Service1_Share_dummy-nfs1 requires NFS-Service1_Proxy_NFS
NFS-Service1_Volume_Volume_cust_471102 requires NFS-Service1_DiskGroup_DiskGroup_nfs1
NFS-Service1_Volume_Volume_dummy-nfs1 requires NFS-Service1_DiskGroup_DiskGroup_nfs1
NFS-Service1_Volume_Volume_lock requires NFS-Service1_DiskGroup_DiskGroup_nfs1
// resource dependency tree
//
// group NFS-Service1
// {
// NFSRestart NFS-Service1_NFSRestart_NFSRestart
// {
// Mount NFS-Service1_Mount_Volume_lock
// {
// Volume NFS-Service1_Volume_Volume_lock
// {
// DiskGroup NFS-Service1_DiskGroup_DiskGroup_nfs1
// }
// }
// IP NFS-Service1_IP_10-10-0-12
// {
// Share NFS-Service1_Share_dummy-nfs1
// {
// Mount NFS-Service1_Mount_Volume_dummy-nfs1
// {
// Volume NFS-Service1_Volume_Volume_dummy-nfs1
// {
// DiskGroup NFS-Service1_DiskGroup_DiskGroup_nfs1
// }
// }
// Proxy NFS-Service1_Proxy_NFS
// }
// Proxy NFS-Service1_Proxy_NIC
// Share NFS-Service1_Share_cust_471102-0
// {
// Mount NFS-Service1_Mount_Volume_cust_471102
// {
// Volume NFS-Service1_Volume_Volume_cust_471102
// {
// DiskGroup NFS-Service1_DiskGroup_DiskGroup_nfs1
// }
// }
// Proxy NFS-Service1_Proxy_NFS
// }
// }
// }
// }