Thursday, April 2, 2015

Create tablespace in shared storage

1. Create the directory which will act as the mount point:



[root@node1 ~]# mkdir -p /u01/nfs_storage

2. Make the necessary entries in the /etc/exports file:
/u01/nfs_storage *(rw,sync,no_wdelay,insecure,insecure_locks,no_root_squash)

3. Start the nfs service:



[root@node1 ~]# chkconfig nfs on
[root@node1 ~]# service nfs restart

4.Make the directory that will store the shared files



[root@node1 ~]# mkdir -p /u01/nfs_oradata
 
5. Make the entries in the /etc/fstab file:



node1:/u01/nfs_storage /u01/nfs_oradata nfs rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768  0 0

6. Now mount the nfs_oradata folder

[root@node1 ~]# mount /u01/nfs_oradata/

7, Make the directory where the tablespace is to be created and give the necessary ownereship:


[root@node1 ~]# mkdir -p /u01/nfs_oradata/orcl
[root@node1 ~]# chown -R oracle:oinstall /u01/nfs_oradata/orcl
 

  
8. Shutdown the database:

[oracle@node1 ~]$ sqlplus / as sysdba
 
SQL> shutdown immediate
  
SQL> exit

9. Format the directory in nfs format:

[oracle@node1 ~]$ cd /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/
[oracle@node1 lib]$ make -f ins_rdbms.mk dnfs_on

10. Startup the database instance:

[oracle@node1 lib]$ sqlplus / as sysdba

SQL> startup

 11. Create the shared tablespace:

SQL> create tablespace tbs1 datafile '/u01/nfs_oradata/orcl/ts_01.DBF' SIZE 10m;
 
12. Check the shared storage information:

SQL> select * from v$dnfs_servers;
 
SQL> select * from v$dnfs_files;
 

 
 

No comments:

Post a Comment