Creating an HA-NFS dataservice

 

Now we have all the bricks to build an HA-nfs dataservice :

  

We will create a global filesystem to host the nfs config file ( /config-nfs )

  • update both /etc/vfstab with the following entry (assuming you use solaris volume manager, and have a diskset named test1-ds) :

/dev/md/test1-ds/dsk/d0 /dev/md/test1-ds/rdsk/d0        /config-nfs  ufs     2       yes     global,logging
  • create a filesystem on it :

# newfs /dev/md/test1-ds/rdsk/d0
  • create the mount point on both nodes :

#mkdir /config-nfs
  • mount it (the will be a global mount)

# mount /config-nfs

  

Create an nfs resource group with a logical hostname, an hastorageplus and an nfs resources

  • create the following directory hierarchy :

# mkdir -p /config-nfs/nfs-admin/SUNW.nfs
  • create a dfstab entry in /config-nfs/nfs-admin/SUNW.nfs ( the name will be dfstab.<name of nfs resource> )

# cat dfstab.nfs-rs
share -F nfs -o ro /shared

#clresourcegroup create -n v4u-4800e-doma-sin06,v4u-4800e-dombc-sin06 nfs-rg 

#clresourcegroup set -p Pathprefix=/config-nfs/nfs-admin nfs-rg 

the logical ip ( nfs-ip-1 will be the name known from the nfs clients systems)

#clreslogicalhostname create -g nfs-rg nfs-ip-1 
  

Create a failover filesystem that will host the nfs shared datas

  • add in /etc/vfstab of both nodes :

/dev/md/test2-ds/dsk/d0 /dev/md/test2-ds/rdsk/d0        /shared  ufs     2       no      -
  • Create a filesystem on it :

# newfs /dev/md/test2-ds/rdsk/d0
  • Create the mount point on both nodes :

# mkdir /shared

And the Hastorageplus, including a dependency between nfs-rs and nrs-stor

#clresource create -g nfs-rg -t SUNW.HAStoragePlus:6 -p FilesystemMountPoints=/shared nfs-stor 
#clresource create -g nfs-rg -t SUNW.nfs:3.2 nfs-rs 
#clresource set -p Resource_dependencies="nfs-stor" nfs-rs 
 
Bring the resource group online :
#clresourcegroup online -M nfs-rg 
  
 

et voila !

# dfshares nfs-ip-1
RESOURCE                                  SERVER ACCESS    TRANSPORT
  nfs-ip-1:/shared                      nfs-ip-1  -         -
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jean-Christophe Lamoure

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today