Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle DNFS

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Oracle Direct NFS Client

The experiment shows that:

Server 1: TEST1 (NFS server)

Server 2: TEST2 (NFS client)

Where:

The NFS server sets the / vol/oradata directory to a shared directory

The database orcl on the NFS client uses the shared directory / vol/oradata and creates tablespaces in the shared directory. The resulting data files are automatically saved on the TES1 (NFS server) machine.

(1) check that the NFS server nfs and portmap services are started normally

TEST1 (NFS server):

[root@TEST1 ~] # / etc/init.d/nfs status

Rpc.mountd (pid 4123) is running...

Nfsd (pid 4120 4119 4118 4117 4116 4115 4114 4113) is running...

Rpc.rquotad (pid 4091) is running...

[root@TEST1 ~] # / etc/init.d/portmap status

Portmap (pid 3585) is running...

(2) configure exports file and share / vol/oradata directory

[root@TEST1 ~] # cat / etc/exports

/ vol/oradata * (rw,sync,no_wdelay,insecure,insecure_locks,no_root_squash)

(3) the NFS client mounts the shared directory / vol/oradata to the / u02/oradata/prod1 directory through the mount command

TEST2 (NFS client):

[root@TEST2] # mount-o remount / vol/oradata / u02/oradata/prod1

[root@TEST2] # df-h

Filesystem Size Used Avail Use% Mounted on

/ dev/sda3 15G 6.0G 7.9G 44% /

/ dev/sda2 30G 8.6g 20g 31% / U01

/ dev/sda1 99m 29m 65m 31% / boot

Tmpfs 1.5G 540M 982m 36% / dev/shm

TEST1.example.com:/vol/oradata

433G 30G 381G 8% / u02/oradata/prod1

(4) TEST2 (NFS client) configure DNFS

[root@TEST2 ~] # vi / etc/oranfstab

Server:server

Path:TEST1.example.com

Local:TEST2.example.com

Export:/vol/oradata mount:/u02/oradata/prod1

(5) TEST2 (NFS client) enable DNFS client

[oracle@TEST2 ~] $cd / u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/

[oracle@TEST2 lib] $make-f ins_rdbms.mk dnfs_on

Rm-f / u01 cp cp / u01/app/oracle/product/11.2.0/dbhome_1/lib/libnfsodm11.so / u01/app/oracle/product/11.2.0/dbhome_1/lib/libodm11.so

(6) TEST2 (NFS client) creates a tablespace test_tbs under a shared directory

SQL > create tablespace test_tbs datafile'/ u02 size oradata size prod1 Universe Testbelt tbs01.dbf' oradata 10m

Tablespace created.

(7) Verification

If the data files created in the TEST2 client / u02/oradata/prod1 directory are automatically generated in the TEST1 server / vol/oradata directory, DNFS is successful.

TES1 server views files

[root@TEST1 ~] # ll-rth / vol/oradata/test_tbs01.dbf

-rw-r- 1 oracle oinstall 11m Jul 19 12:40 / vol/oradata/test_tbs01.dbf

TEST2 client views files

[oracle@TEST2 lib] $ll-rth / u02/oradata/prod1/test_tbs01.dbf

-rw-r- 1 oracle oinstall 11m Jul 19 12:40 / u02/oradata/prod1/test_tbs01.dbf

View the following dynamic performance views

If the result is empty, you need to restart the database instance

SQL > set linesize 200

SQL > col filename for A50

SQL > select * from v$dnfs_files

FILENAME FILESIZE PNUM SVR_ID

/ u02/oradata/prod1/test_tbs01.dbf 10493952 10 1

SQL > col svrname for A20

SQL > col dirname for A20

SQL > select * from v$dnfs_servers

ID SVRNAME DIRNAME MNTPORT NFSPORT WTMAX RTMAX

1 server / vol/oradata 963 2049 32768 32768

For more details on DNFS, see the official documentation. The link is as follows:

Http://docs.oracle.com/cd/E11882_01/install.112/e47689/post_inst_task.htm#LADBI1297

Http://docs.oracle.com/cd/E11882_01/install.112/e41961/storage.htm#CWLIN279

One: Enabling a Direct NFS Client

By default Direct NFS Client serves mount entries found in / etc/mtab.

No other configuration is required.

You can use oranfstab to specify additional Oracle Database specific options to Direct NFS Client.

For example, you can use oranfstab to specify additional paths for a mount point.

A new Oracle Database specific file oranfstab can be added to either / etc or to $ORACLE_HOME/dbs.

When oranfstab is placed in $ORACLE_HOME/dbs, its entries are specific to a single database.

However, when oranfstab is placed in / etc, then it is global to all Oracle databases, and hence can contain mount points for all Oracle databases.

Note:

Direct NFS Client does not work and falls back to the traditional kernel NFS path if the back-end NFS server does not support a write size (wtmax) of 32768 or larger.

Direct NFS Client determines mount point settings to NFS storage devices based on the configurations in / etc/mtab. Direct NFS Client looks for the mount point entries in the following order:

(1) $ORACLE_HOME/dbs/oranfstab

(2) / etc/oranfstab

(3) / etc/mtab

It uses the first matched entry as the mount point.

Oracle Database requires that mount points be mounted by the kernel NFS system even when served through Direct NFS Client.

Complete the following procedure to enable Direct NFS Client:

1.You can optionally create an oranfstab file with the following attributes for each NFS server to be accessed using Direct NFS Client:

(1) Server:

The NFS server name.

(2) Path:

Up to four network paths to the NFS server, specified either by IP address, or by name, as displayed using the ifconfig command on the filer.

(3) Local:

Up to four local paths on the database host, specified by IP address or by name, as displayed using the ifconfig command run on the database host.

(4) Export:

The exported path from the NFS server.

(5) Mount:

The corresponding local mount point for the exported volume.

(6) Dontroute:

Specifies that outgoing messages should not be routed by the operating system, but sent using the IP address they are bound to.

Please note that this attribute does not work on Linux with multiple paths in the same subnet.

(7) mnt_timeout:

Specifies (in seconds) the time for which Direct NFS Client should wait for a successful mount before timing out.

This parameter is optional and the default timeout is 10 minutes.

(8) management:

Enables Direct NFS Client to use the management interface for SNMP queries.

You can use this parameter if SNMP is running on separate management interfaces on the NFS server.

The default value is the server parameter value.

(9) community:

Specifies the community string for use in SNMP queries. The default value is public.

Example 3-1 Using Local and Path NFS Server Entries

The following example uses both local and path. Since they are in different subnets, we do not have to specify dontroute.

Server: MyDataServer1

Local: 192.0.2.0

Path: 192.0.2.1

Local: 192.0.100.0

Path: 192.0.100.1

Export: / vol/oradata1 mount: / mnt/oradata1

Community: private

Example 3-2 Using Local and Path in the Same Subnet, with dontroute

The following example shows local and path in the same subnet. Dontroute is specified in this case:

Server: MyDataServer2

Local: 192.0.2.0

Path: 192.0.2.128

Local: 192.0.2.1

Path: 192.0.2.129

Dontroute

Export: / vol/oradata2 mount: / mnt/oradata2

Management: 192.0.10.128

Example 3-3 Using Names in Place of IP Addresses, with Multiple Exports

Server: MyDataServer3

Local: LocalPath2

Path: NfsPath2

Local: LocalPath3

Path: NfsPath3

Local: LocalPath4

Path: NfsPath4

Local: LocalPath5

Path: NfsPath5

Dontroute

Export: / vol/oradata3 mount: / mnt/oradata3

Export: / vol/oradata4 mount: / mnt/oradata4

Export: / vol/oradata5 mount: / mnt/oradata5

Export: / vol/oradata6 mount: / mnt/oradata6

By default, Direct NFS Client is installed in a disabled state. To enable Direct NFS Client, complete the following steps on each node. If you use a shared Grid home for the cluster, then complete the following steps in the shared Grid home:

Log in as the Oracle Grid Infrastructure installation owner.

Change directory to Grid_home/rdbms/lib.

Enter the following commands:

$make-f ins_rdbms.mk dnfs_on

Two: Disabling Direct NFS Client

Complete the following steps to disable the Direct NFS Client:

Log in as the Oracle software installation owner, and disable Direct NFS Client using the following commands:

Cd $ORACLE_HOME/rdbms/lib

Make-f ins_rdbms.mk dnfs_off

Remove the oranfstab file.

Note:

If you remove an NFS path that Oracle Database is using, then you must restart the database for the change to take effect.

Welcome to follow my Wechat official account "IT Little Chen" and learn and grow together!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report