C H A P T E R 6 |
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.
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. |
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
Follow the procedure in the appropriate subsection for your system:
To update the /etc/fstab file, use the appropriate following option.
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
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
To update the /etc/vfstab file, use the appropriate following option.
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
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
Follow the procedure in the appropriate subsection for your system:
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
Enable the NFS Client Service on the Solaris 11 host with the following command:
svcadm enable -r nfs/client
Follow the procedure in the appropriate subsection for your system:
To update the oranfstab file to access Sun ZFS Backup Appliance exports for Oracle Exadata, use the appropriate following option.
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
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
To update the oranfstab file to access Sun ZFS Backup Appliance exports for Oracle SPARC SuperCluster, use the appropriate following option.
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
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
Follow the procedure in the appropriate subsection for your system:
To mount the shares on the host, enter one of the following options:
# service mount_dbname start
# dcli -l root -g /home/oracle/dbs_group service mount_dbname start
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
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/*
# 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
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.