C H A P T E R  6

Feedback Configuration Details for Client NFS Mount and Oracle dNFS

This chapter contains sample scripts showing how to attach the Sun ZFS Backup Appliance to an Oracle Exadata or Oracle SPARC SuperCluster. These scripts are designed to support a database named dbname in a one-pool and a two-pool Sun ZFS Backup Appliance configuration.


General Implementation Steps

The implementation steps are:

1. Set up the directory structure (mount points) to mount the shares on the host.

2. Update a file to mount the exported shares to the appropriate mount points.

3. Automate mounting and unmounting of the shares.

4. Update the oranfstab file to access the Sun ZFS Backup Appliance exported shares or set mount on boot in /etc/fstab.

5. Mount the shares on the host.

6. Change the permissions of the mounted shares to match the permission settings of ORACLE_HOME.

7. Restart the Oracle Database instance to pick up the changes to the oranfstab file.

These steps are described in more detail in the following sections.



Note - For Oracle Exadata, if you used the Oracle Exadata Backup Configuration Utility, all steps except for step 4 and step 7 have already been performed for you.



Detailed Implementation Steps

Setting Up the Directory Structure to Mount the Shares on the Host

Set up mount points for the shares on the host as shown.

mkdir -p /zfssa/dbname/backup1
mkdir -p /zfssa/dbname/backup2
mkdir -p /zfssa/dbname/backup3
mkdir -p /zfssa/dbname/backup4

Updating a File to Mount Exported Shares

Follow the procedure in the appropriate subsection for your system:

Updating the /etc/fstab File for Oracle Exadata

To update the /etc/fstab file, use the appropriate following option.



Note - The UNIX newline escape character (\) indicates a single line of code has been wrapped to a second line in the listing below. When entering a wrapped line into fstab, remove the \ character and combine the two line segments into a single line.


 

For a one-pool configuration:

192.168.36.200:/export/dbname/backup1 /zfssa/dbname/backup1 nfs \
noauto,rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,\
nfsvers=3,timeo=600 0 0
192.168.36.200:/export/dbname/backup2 /zfssa/dbname/backup2 nfs \
noauto,rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,\
nfsvers=3,timeo=600 0 0
192.168.36.200:/export/dbname/backup3 /zfssa/dbname/backup3 nfs \
noauto,rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,\
nfsvers=3,timeo=600 0 0
192.168.36.200:/export/dbname/backup4 /zfssa/dbname/backup4 nfs \
noauto,rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,\
nfsvers=3,timeo=600 0 0
 

For a two-pool configuration:

192.168.36.200:/export/dbname/backup1 /zfssa/dbname/backup1 nfs \
noauto,rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,\
nfsvers=3,timeo=600 0 0
192.168.36.201:/export/dbname/backup2 /zfssa/dbname/backup2 nfs \
noauto,rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,\
nfsvers=3,timeo=600 0 0
192.168.36.200:/export/dbname/backup3 /zfssa/dbname/backup3 nfs \
noauto,rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,\
nfsvers=3,timeo=600 0 0
192.168.36.201:/export/dbname/backup4 /zfssa/dbname/backup4 nfs \
noauto,rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,\
nfsvers=3,timeo=600 0 0

Updating the /etc/vfstab File for Oracle SPARC SuperCluster

To update the /etc/vfstab file, use the appropriate following option.



Note - The UNIX newline escape character (\) indicates a single line of code has been wrapped to a second line in the listing below. When entering a wrapped line into vfstab, remove the \ character and combine the two line segments into a single line.


 

For a one-pool configuration:

192.168.36.200:/export/dbname/backup1  -  /zfssa/dbname/backup1  \
nfs - yes rw,bg,hard,nointr,rsize=1048576,wsize=1048576,proto=\
tcp,vers=3,forcedirectio
192.168.36.200:/export/dbname/backup2  -  /zfssa/dbname/backup2  \
nfs - yes rw,bg,hard,nointr,rsize=1048576,wsize=1048576,proto=\
tcp,vers=3,forcedirectio
192.168.36.200:/export/dbname/backup3  -  /zfssa/dbname/backup3  \
nfs - yes rw,bg,hard,nointr,rsize=1048576,wsize=1048576,proto=\
tcp,vers=3,forcedirectio
192.168.36.200:/export/dbname/backup4  -  /zfssa/dbname/backup4  \
nfs - yes rw,bg,hard,nointr,rsize=1048576,wsize=1048576,proto=\
tcp,vers=3,forcedirectio
 

For a two-pool configuration:

192.168.36.200:/export/dbname/backup1  -  /zfssa/dbname/backup1  \
nfs - yes rw,bg,hard,nointr,rsize=1048576,wsize=1048576,proto=\
tcp,vers=3,forcedirectio
192.168.36.201:/export/dbname/backup2  -  /zfssa/dbname/backup2  \
nfs - yes \ rw,bg,hard,nointr,rsize=1048576,wsize=1048576,proto=\
tcp,vers=3,forcedirectio
192.168.36.200:/export/dbname/backup3  -  /zfssa/dbname/backup3  \
nfs - yes rw,bg,hard,nointr,rsize=1048576,wsize=1048576,proto=\
tcp,vers=3,forcedirectio
192.168.36.201:/export/dbname/backup4  -  /zfssa/dbname/backup4  \
nfs - yes rw,bg,hard,nointr,rsize=1048576,wsize=1048576,proto=\
tcp,vers=3,forcedirectio

Automating Share Mounting and Unmounting

Follow the procedure in the appropriate subsection for your system:

Creating an init.d Service for Oracle Exadata

Create an init.d service using the appropriate following option.

#!/bin/sh
#
# zfssa_dbname: Mount ZFSSA project dbname for database dbname
#
# chkconfig: 345 61 19
# description: mounts ZFS Storage Appliance shares
#
 
start()
{
   mount /zfssa/dbname/backup1
   mount /zfssa/dbname/backup2
   mount /zfssa/dbname/backup3
   mount /zfssa/dbname/backup4
   echo "Starting $prog: "
}
 
stop()
{
   umount /zfssa/dbname/backup1
   umount /zfssa/dbname/backup2
   umount /zfssa/dbname/backup3
   umount /zfssa/dbname/backup4
   echo "Stopping $prog: "
}
 
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        start
        ;;
  status)
        mount
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|status}"
        exit 1
esac
 

(Optional) Enable the init.d service for start-on-boot by entering:

# chkconfig zfssa_dbname on
 

(Optional) Start and stop the service manually using the service commands:

# service zfssa_dbname start
# service zfssa_dbname stop

Enabling the NFS Client Service for Oracle SPARC SuperCluster

Enable the NFS Client Service on the Solaris 11 host with the following command:

svcadm enable -r nfs/client

Updating oranfstab to Access Sun ZFS Backup Appliance Exports

Follow the procedure in the appropriate subsection for your system:

Updating oranfstab to Access Sun ZFS Backup Appliance Exports for Oracle Exadata

To update the oranfstab file to access Sun ZFS Backup Appliance exports for Oracle Exadata, use the appropriate following option.

For a one-pool configuration:

server: 192.168.36.200
local: 192.168.36.100 path: 192.168.36.200
local: 192.168.36.101 path: 192.168.36.201
local: 192.168.36.102 path: 192.168.36.202
local: 192.168.36.103 path: 192.168.36.203
export: /export/dbname/backup1 mount: /zfssa/dbname/backup1
export: /export/dbname/backup2 mount: /zfssa/dbname/backup2
export: /export/dbname/backup3 mount: /zfssa/dbname/backup3
export: /export/dbname/backup4 mount: /zfssa/dbname/backup4

 

For a two-pool configuration:

server: 192.168.36.200
local: 192.168.36.100 path: 192.168.36.200
local: 192.168.36.101 path: 192.168.36.202
export: /export/dbname/backup1 mount: /zfssa/dbname-2pool/backup1
export: /export/dbname/backup3 mount: /zfssa/dbname-2pool/backup3
server: 192.168.36.201
local: 192.168.36.102 path: 192.168.36.201
local: 192.168.36.103 path: 192.168.36.203
export: /export/dbname/backup2 mount: /zfssa/dbname-2pool/backup2
export: /export/dbname/backup4 mount: /zfssa/dbname-2pool/backup4

Updating oranfstab to Access Sun ZFS Backup Appliance Exports for Oracle SPARC SuperCluster

To update the oranfstab file to access Sun ZFS Backup Appliance exports for Oracle SPARC SuperCluster, use the appropriate following option.

For a one-pool configuration:

server: 192.168.36.200
path: 192.168.36.200
path: 192.168.36.201
path: 192.168.36.202
path: 192.168.36.203
export: /export/dbname/backup1 mount: /zfssa/dbname/backup1
export: /export/dbname/backup2 mount: /zfssa/dbname/backup2
export: /export/dbname/backup3 mount: /zfssa/dbname/backup3
export: /export/dbname/backup4 mount: /zfssa/dbname/backup4

 

For a two-pool configuration:

server: 192.168.36.200
path: 192.168.36.200
path: 192.168.36.202
export: /export/dbname/backup1 mount: /zfssa/dbname-2pool/backup1
export: /export/dbname/backup3 mount: /zfssa/dbname-2pool/backup3
server: 192.168.36.201
path: 192.168.36.201
path: 192.168.36.203
export: /export/dbname/backup2 mount: /zfssa/dbname-2pool/backup2
export: /export/dbname/backup4 mount: /zfssa/dbname-2pool/backup4

Mounting the Shares on the Host

Follow the procedure in the appropriate subsection for your system:

Mounting the Shares on Oracle Exadata

To mount the shares on the host, enter one of the following options:

# service mount_dbname start

or

# dcli -l root -g /home/oracle/dbs_group service mount_dbname start

Mounting the Shares on Oracle SPARC SuperCluster

Using the standard Solaris mount command, manually mount the shares:

# mount /zfssa/dbname/backup1
# mount /zfssa/dbname/backup2
# mount /zfssa/dbname/backup3
# mount /zfssa/dbname/backup4

Setting the Ownership of the Mounted Shares

Change the permission settings of the mounted shares to match the permission settings of ORACLE_HOME. In this example, the user and group ownerships are set to oracle:dba.



Note - For Oracle Exadata, if you used the Oracle Exadata Backup Configuration Utility, step 1 has already been performed for you.


1. For Oracle Exadata, enter one of the following two options. For Oracle SPARC SuperCluster, enter the first option.

# chown oracle:dba /zfssa/dbname/*

or

# dcli -l root -g /home/oracle/dbs_group chown oracle:dba /zfssa/dbname/*

2. Restart the Oracle Database instance to pick up the changes that were made to the oranfstab file using one of the following options:

$ srvctl stop instance -d dbname -i dbname1
$ srvctl start instance -d dbname -i dbname1
$ srvctl stop instance -d dbname -i dbname2
$ srvctl start instance -d dbname -i dbname2
$ srvctl stop instance -d dbname -i dbname3
$ srvctl start instance -d dbname -i dbname3
$ srvctl stop instance -d dbname -i dbname4
$ srvctl start instance -d dbname -i dbname4
$ srvctl stop instance -d dbname -i dbname5
$ srvctl start instance -d dbname -i dbname5
$ srvctl stop instance -d dbname -i dbname6
$ srvctl start instance -d dbname -i dbname6
$ srvctl stop instance -d dbname -i dbname7
$ srvctl start instance -d dbname -i dbname7
$ srvctl stop instance -d dbname -i dbname8
$ srvctl start instance -d dbname -i dbname8
 
$ srvctl stop database -d dbname
$ srvctl start database -d dbname

 

Feedback