Create and Manage a tablespace that uses NFS mounted file system file

1. Documentation in Tahiti -> Masters Book List -> Administrator’s Guide -> 5 Oracle Database Postinstallation Tasks -> Required Product-Specific Postinstallation Tasks -> Configuring and Using Direct NFS Client

MOS (Metalink) there is a note with the details of setting Direct NFS on Linux (11g) -> “Step by Step – Configure Direct NFS Client (DNFS) on Linux (11g) [ID 762374.1]”.

2. There are two options when storing DATAFILES in NFS. We can use NFS internal client OS, or we can use the driver included in the Oracle software. For this exercise we will use the Oracle driver known as Direct NFS to store DATAFILES a test TBS. Later, we will test the NFS Oracle Linux software on target “Create and Manage as ASM Instance”.

# The first part, which is to provide the CMO NFS machine is virtually identical to that objective.
# Create the location to accommodate the NFS drives. To do this we make the following steps as root in OCM:
mkdir -p / u01 / nfs_storage
vi / etc / exports
# Add the following line to / etc / exports. (It is important to add the 'insecure')
/ U01 / nfs_storage * (rw, sync, no_wdelay, insecure, insecure_locks, no_root_squash)
# Start the nfs service
chkconfig nfs on
service nfs restart

# Now we must configure access to the disks NFS
# Execute the instructions in CMO (as root too)
mkdir -p / u01 / nfs_oradata
# Configure the / etc / fstab to mount the NFS
vi / etc / fstab
# Add the following line (in this case we removed the "actimeo = 0" because we are not using a RAC)
CMO: / u01 / nfs_storage / u01 / nfs_oradata nfs rw, bg, hard, nointr, tcp, v = 3, timeo = 600, rsize = 32768, wsize = 32768 0 0
# Mount the filesystem, create a directory for the BD DATAFILES CMO and give the appropriate permissions
mount / u01 / nfs_oradata
mkdir -p / u01 / nfs_oradata / CMO
chown -R oracle: oinstall / u01 / nfs_oradata
# We check that the resource has already been mounted correctly (we view the settings with its attributes)
mount

# Now let's set Direct NFS. The client determines the Oracle kernel NFS mount points devices in this order:
# 1. $ ORACLE_HOME / dbs / oranfstab
# 2 / etc / oranfstab
# 3. / etc / mtab
# Oracle requires that the resource is mounted by the customer's own OS kernel but we will use Direct NFS (go groundnut, no?)
# We will use only '/ etc / mtab' (the oranfstab file is used to add load balancing for multiple interfaces)
- We stopped the DB
IMMEDIATE SHUTDOWN

# We enable Direct NFS (specific 11gR2)
cd $ ORACLE_HOME / rdbms / lib
make -f ins_rdbms.mk dnfs_on

- We raised the DB
STARTUP
- Validate that the ALERT BD indicating that the next line is already using Direct NFS appears:
- # "Oracle instance running with ODM: ODM Library Oracle Direct NFS Version 2.0"

- Create a test TBS in NFS
TESTNFS CREATE TABLESPACE DATAFILE '/u01/nfs_oradata/OCM/testnfs01.dbf' SIZE 100M;
- If we review the ALERT, when you start to use Direct NFS appear the following lines:
- # Direct NFS: channel id [0] path [CMO] to filer [COM] Local via [] is UP
- # Direct NFS: channel id [1] path [CMO] to filer [COM] Local via [] is UP

- We will make further checks to confirm that we are using Direct NFS (DNFS)
- We check the list of servers accessed using DNFS
SELECT * FROM V $ DNFS_SERVERS;
- We check the file list (DATAFILES) open with DNFS (we have to see that we just created 'testnfs01.dbf')
SELECT * FROM V $ DNFS_FILES;
- Other sights of interest are V $ DNFS_CHANNELS (channels available) and V $ DNFS_STATS (performance statistics)

- Now we undo all the mess
- Delete the TBS
DROP TABLESPACE INCLUDING CONTENTS TESTNFS AND DATAFILES;
- We stopped the BD
IMMEDIATE SHUTDOWN
# Dismantle the NFS (as root)
umount / u01 / nfs_oradata
# Stopped the service and we disable the autostart
service nfs stop
chkconfig nfs off
# Remove directories
rm rf / u01 / nfs_storage
rm rf / u01 / nfs_oradata
# Remove the lines added to / etc / fstab and / etc / export
# Finally, disclaim library DNFS Oracle kernel (run this as oracle)
cd $ ORACLE_HOME / rdbms / lib
make -f ins_rdbms.mk dnfs_off

- We raised the BD and here as if nothing has happened
; - & Gt - In the alert line should no longer appear "Oracle instance running with ODM: ODM Library Oracle Direct NFS Version 2.0"
STARTUP

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.