Friday 5 August 2011

NFS Mount on Linux

You have:

192.168.0.137 = your server (Standby -- needs  Primay node's mount point)
192.168.0.126 = linux client (Primary)

*On the Primary server (192.168.0.126)*
1. Check nfs service == service nfs status
2. edit /etc/exports --make sure it contains just the line (with a blank line after it):
(Primary nfs directory) (standbyIP)(Permissions)
/u01/app/oracle/flash_recovery_area/FWLIVE 192.168.0.137(rw,sync,no_root_squash)
other e.g. cat /etc/exports
/data/backup frameworkprod(rw)
/logs/backup/dbbackup tpk-efr-005(rw,sync,no_root_squash)
/logs/backup 10.254.249.12(ro,sync,no_root_squash) 10.254.249.22(ro,sync,no_root_squash) tpk-efr-002(ro,no_root_squash)
/logs/archivelogs/FWLIVE tpk-efr-005(rw,sync,no_root_squash)
3. service nfs restart

*On the Standby Server (192.168.0.137)*
4. edit /etc/fstab and add/edit the line(you may need to restart server to effect /etc/fstab):

OraDRProd:/u01/app/oracle/flash_recovery_area/FWLIVE /u01/app/oracle/flash_recovery_area/FWLIVE nfs rw,bg,hard,rsize=32768,wsize=32768,nfsvers=3,nointr,timeo=600,tcp 0 0
Or
192.168.0.126:/u01/app/oracle/flash_recovery_area/FWLIVE /u01/app/oracle/flash_recovery_area/FWLIVE nfs rw,bg,hard,rsize=32768,wsize=32768,nfsvers=3,nointr,timeo=600,tcp 0 0


5. make sure /u01/app/oracle/flash_recovery_area/FWLIVE exists (mkdir –p /u01/app/oracle/flash_recovery_area/FWLIVE )
6. mount -t nfs OraDRProd:/u01/app/oracle/flash_recovery_area/FWLIVE /u01/app/oracle/flash_recovery_area/FWLIVE
or
mount -t nfs -o rw,bg,hard,rsize=32768,wsize=32768,nfsvers=3,nointr,timeo=600,tcp OraDRProd:/u01/app/oracle/flash_recovery_area/FWLIVE /u01/app/oracle/flash_recovery_area/FWLIVE


If it does mount up ok, then you can unmount and change /etc/fstab to mount the directory to wherever you wanted it in the first place. Dont forget to remove the /u01/app/oracle/flash_recovery_area/FWLIVE mount point with rmdir.

NFS Mount Options

You must mount NFS volumes used for storing database files with special mount options on the host where the database server is running. When mounting an NFS file system, Oracle recommends that you use the same mount point options that your NAS vendor used when certifying the device. Refer to your device documentation or contact your vendor for information about recommended mount-point options.
In general, most vendors recommend that you use the NFS mount options listed in the following table.
OptionRequirementDescription
hardMandatoryGenerate a hard mount of the NFS file system. If the connection to the server fails or is temporarily lost, connection attempts are made until the NAS device responds.
bgOptionalTry to connect in the background if connection fails.
tcpOptionalUse the TCP protocol rather than UDP. TCP is more reliable than UDP.
nfsvers=3OptionalUse NFS version 3. Oracle recommends that you use NFS version 3 where available, unless the performance of version 2 is higher.
suidOptionalAllow clients to run executables with SUID enabled. This option is required for Oracle software mount points.
rsizeMandatoryThe number of bytes used when reading from the NAS device. This value should be set to the maximum database block size supported by this platform. A value of 8192 is often recommended for NFS version 2 and 32768 is often recommended for NFS version 3.
wsizeMandatoryThe number of bytes used when writing to the NAS device. This value should be set to the maximum database block size supported by this platform. A value of 8192 is often recommended for NFS version 2 and 32768 is often recommended for NFS version 3.
nointr (orintr)OptionalDo not allow (or allow) keyboard interrupts to kill a process that is hung while waiting for a response on a hard-mounted file system.
Note: Different vendors have different recommendations about this option. Contact your vendor for advice.
actime=0 or noacMandatoryDisable attribute caching.
Note: You must specify this option for NFS file systems where you want to install the software. If you do not use this option, Oracle Universal Installer will not install the software in the directory that you specify.

The mandatory mount options comprise the minimum set of mount options that you must use while mounting the NFS volumes. These mount options are essential to protect the integrity of the data and to prevent any database corruption. Failure to use these mount options may result in the generation of file access errors. Refer to your operating system or NAS device documentation for more information about the specific options supported on your platform.
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=359515.1

No comments: