Sample configurations

Configuration

NFS NFS_groupx_24 (

Nservers = 24

)

Setting Nproc configuration

Refer to the configuration for Share agent for more information.

NFS nfs_group_16 (

Nproc = 16

)

Configuring NFS lock on shared storage

include "types.cf"

cluster vcs_cluster (

CounterInterval = 5

)

system sysa(

)

system sysb(

)

group test_grp (

SystemList = { sysa=0, sysb=1 }

)

DiskGroup test_dg (

DiskGroup = test_dg

)

IP test_ip (

Device = eth0

Address = "10.182.13.28"

NetMask = "255.255.240.0"

)

Mount test_mnt (

MountPoint = "/test_mnt"

BlockDevice = "/dev/vx/dsk/test_dg/test_vol"

FSType = ext3

MountOpt = rw

FsckOpt = "-y"

)

Mount test_lockinfo_mnt (

MountPoint = "/lockinfo"

BlockDevice = "/dev/vx/dsk/test_dg/test_lockinfo_vol"

FSType = ext3

MountOpt = rw

FsckOpt = "-y"

)

NFS test_nfs (

Address = "10.182.13.28"

)

NFSRestart test_nfsrestartres (

NFSLockFailover = 1

LocksPathName = "/test_mnt"

NFSRes = test_nfs

)

Share test_share (

PathName = "/test_mnt"

Options = "-o rw"

)

Volume test_lockinfo_vol (

Volume = test_lockinfo_vol

DiskGroup = test_dg

)

Volume test_vol (

Volume = test_vol

DiskGroup = test_dg

)

test_nfsrestartres requires test_ip

test_nfsrestartres requires test_lockinfo_mnt

test_lockinfo_mnt requires test_lockinfo_vol

test_lockinfo_vol requires test_dg

test_ip requires test_share

test_share requires test_nfs

test_share requires test_mnt

test_mnt requires test_vol

test_vol requires test_dg

NFSv4Support attribute configuration

This sample configuration is for NFS when the NFSv4Support attribute is 1. Note that the share test_share0 has fsid = 0 in Options attribute. This indicates that /home/export is root of all the exports. The client needs to mount only this root filesystem instead of mounting all shares individually.

The syntax is:

mount -t nfs4 <server>:/ <mountpoint>

Note that path after colon(:) is always /

Also note that all the filesystems other then the root filesystem should have the nohide option set in Options attribute of share resources. Set the nohide option so that authentic clients can seamlessly move through the tree of exported filesystems just by mounting the root filesystem.

include "types.cf"

cluster vcs_139 (

UserNames = { admin = IJKcJEjGKfKKiSKeJH, a = gJJd }

Administrators = { admin, a }

)

system vcslinux139 (

)

system vcslinux140 (

)

group nfstest (

SystemList = { vcslinux139 = 0, vcslinux140 = 1 }

)

DiskGroup test_dg1 (

DiskGroup = nfsdg

)

IP test_ip (

Device = eth0

Address = "10.212.88.37"

NetMask = "255.255.254.0"

)

Mount test_mnt0 (

MountPoint = "/home/export"

BlockDevice = "/dev/vx/dsk/nfsdg/vol0"

FSType = vxfs

MountOpt = rw

FsckOpt = "-n"

)

Mount test_mnt1 (

MountPoint = "/home/export/nshare1"

BlockDevice = "/dev/vx/dsk/nfsdg/vol1"

FSType = vxfs

MountOpt = rw

FsckOpt = "-n"

)

Mount test_mnt2 (

MountPoint = "/home/export/nshare2"

BlockDevice = "/dev/vx/dsk/nfsdg/vol2"

FSType = vxfs

MountOpt = rw

FsckOpt = "-n"

)

Mount test_mnt3 (

MountPoint = "/home/export/nshare3"

BlockDevice = "/dev/vx/dsk/nfsdg/vol3"

FSType = vxfs

MountOpt = rw

FsckOpt = "-n"

)

NFS test_nfs (

Nproc = 10

NFSv4Support = 1

)

NFSRestart test_nfsres (

NFSRes = test_nfs

)

NIC test_nic (

Device = eth0

)

Share test_share0 (

PathName = "/home/export"

Options = "rw,nohide,fsid=0"

)

Share test_share1 (

PathName = "/home/export/nshare1"

Options = "rw,nohide"

)

Share test_share2 (

PathName = "/home/export/nshare2"

Options = "rw,nohide"

)

Share test_share3 (

PathName = "/home/export/nshare3"

Options = "rw,nohide"

)

Volume test_vol0 (

DiskGroup = nfsdg

Volume = vol0

)

Volume test_vol1 (

DiskGroup = nfsdg

Volume = vol1

)

Volume test_vol2 (

DiskGroup = nfsdg

Volume = vol2

)

Volume test_vol3 (

DiskGroup = nfsdg

Volume = vol3

)

test_ip requires test_nic

test_ip requires test_share0

test_ip requires test_share1

test_ip requires test_share2

test_ip requires test_share3

test_mnt0 requires test_vol0

test_mnt1 requires test_mnt0

test_mnt1 requires test_vol1

test_mnt2 requires test_mnt0

test_mnt2 requires test_vol2

test_mnt3 requires test_mnt0

test_mnt3 requires test_vol3

test_nfsres requires test_ip

test_share0 requires test_mnt0

test_share0 requires test_nfs

test_share1 requires test_mnt1

test_share1 requires test_nfs

test_share2 requires test_mnt2

test_share2 requires test_nfs

test_share3 requires test_mnt3

test_share3 requires test_nfs

test_vol0 requires test_dg1

test_vol1 requires test_dg1

test_vol2 requires test_dg1

test_vol3 requires test_dg1

// resource dependency tree

//

// group nfstest

// {

// NFSRestart test_nfsres

// {

// IP test_ip

// {

// NIC test_nic

// Share test_share0

// {

// Mount test_mnt0

// {

// Volume test_vol0

// {

// DiskGroup test_dg1

// }

// }

// NFS test_nfs

// }

// Share test_share1

// {

// Mount test_mnt1

// {

// Mount test_mnt0

// {

// Volume test_vol0

// {

// DiskGroup test_dg1

// }

// }

// Volume test_vol1

// {

// DiskGroup test_dg1

// }

// }

// NFS test_nfs

// }

// Share test_share2

// {

// Mount test_mnt2

// {

// Mount test_mnt0

// {

// Volume test_vol0

// {

// DiskGroup test_dg1

// }

// }

// Volume test_vol2

// {

// DiskGroup test_dg1

// }

// }

// NFS test_nfs

// }

// Share test_share3

// {

// Mount test_mnt3

// {

// Mount test_mnt0

// {

// Volume test_vol0

// {

// DiskGroup test_dg1

// }

// }

// Volume test_vol3

// {

// DiskGroup test_dg1

// }

// }

// NFS test_nfs

// }

// }

// }

// }

Configuration

NFS NFS_groupx_24 (

Nservers = 24

LockFileTimeout = 240

)