RAC歸檔配置方案:使用NFS共享儲存儲存歸檔檔案
RAC歸檔配置方案一:使用NFS共享儲存儲存歸檔檔案
1.軟體版本
10.2.0.1.0 on 2.6.18-53.el5
2.測試機器
192.168.1.100 NFS
192.168.1.101 rac1
192.168.1.102 rac2
3.總體流程
-->配置NFS服務(192.168.1.103)
-->在RAC1節點上掛載NFS(192.168.1.101)rac1-rac2兩個節點掛載點路徑一致
-->在RAC2節點上掛載NFS(192.168.1.102)rac1-rac2兩個節點掛載點路徑一致
-->為RAC資料庫開啟歸檔
-->測試、確認以上配置達到目的
4.rsize=20480000,wsize=20480000設定過小,在RMAN備份時會卡住
5.測試結果見樓下,歡迎補充、指正
一、配置NFS服務(192.168.1.103)
1、在一個非常大的檔案系統上建立目錄
$ mkdir /u01/arch
$ ll -d /u01/arch
drwxr-xr-x 2 oracle oinstall 4096 Jul 6 11:01 /u01/arch
2、將該目錄在/etc/exports中共享
# vim /etc/exports
/u01/arch *(rw,sync,no_all_squash)
3、在nfs服務端手動啟動NFS伺服器
# service nfs restart
4、開機自動載入NFS服務
# chkconfig --list nfs
nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
# chkconfig nfs on
二、在RAC1節點上掛載NFS(192.168.1.101)rac1-rac2兩個節點掛載點路徑一致
1、以oracle身份建立NFS的掛載點目錄
[oracle@rac1 ~]$ mkdir /u01/rac_arch
2、以root身份手工掛載NFS目錄
[oracle@rac1 ~]$ su - root
[root@rac1 ~]# mount -t nfs -o rw 192.168.1.101:/u01/arch /u01/rac_arch
[root@rac1 ~]# ls -ld /u01/rac_arch/
drwxr-xr-x 2 oracle oinstall 4096 Jul 6 11:01 /u01/rac_arch/
3、以oracle身份測試NFS共享儲存
[oracle@rac1 ~]$ touch /u01/rac_arch/oracle_1
[oracle@rac1 ~]$ ll /u01/rac_arch/oracle_1
-rw-r--r-- 1 oracle oinstall 0 Jul 6 11:42 /u01/rac_arch/oracle_1
三、在RAC2節點上掛載NFS(192.168.1.102)rac1-rac2兩個節點掛載點路徑一致
1、以oracle身份建立NFS的掛載點目錄
[oracle@rac2 ~]$ mkdir /u01/rac_arch
2、以root身份手工掛載NFS目錄
[root@rac1 ~]# mount -t nfs -o rw 192.168.1.101:/u01/arch /u01/rac_arch
[root@rac1 ~]# ls -ld /u01/rac_arch/
drwxr-xr-x 2 oracle oinstall 4096 Jul 6 11:01 /u01/rac_arch/
3、以oracle身份測試NFS共享儲存
[oracle@rac2 ~]$ touch /u01/rac_arch/oracle_2
[oracle@rac2 ~]$ ll /u01/rac_arch/oracle_2
-rw-r--r-- 1 oracle oinstall 0 Jul 6 11:42 /u01/rac_arch/oracle_2
四、為RAC資料庫開啟歸檔
1、調整歸檔日誌路徑
SYS@RACDB1> alter system set log_archive_dest_1='LOCATION=/u01/rac_arch/';
SYS@RACDB1> show parameter log%_1
--log_archive_dest_1 string LOCATION=/u01/rac_arch
2、調整歸檔日誌檔案命名方式
SYS@RACDB1> alter system set log_archive_format ='arch_%S_%R_%T.arc' scope=spfile;
SYS@RACDB1> select value from v$spparameter where name='log_archive_format';
--arch_%S_%R_%T.arc
--log_archive_format string %t_%s_%r.dbf
%s: 日誌序列號
%S:日誌序列號(帶有前導0)。
%t: 重做執行緒編號。
%T: 重做執行緒編號(帶有前導0)
%a: %A:資料庫ID號
%d: 資料庫ID號
%r: RESETLOGS的id值
3、關閉所有節點資料庫例項
$ srvctl stop database -d RACDB
$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application OFFLINE OFFLINE
ora....B2.inst application ONLINE OFFLINE
ora.RACDB.db application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
4、在其中一個節點上開歸檔
SYS@RACDB1> startup mount
SYS@RACDB1> alter database archivelog;
SYS@RACDB1> alter database open;
5、開啟所有節點資料庫例項
$ srvctl stop database -d RACDB
$ srvctl start database -d RACDB;sleep 60
五、測試、確認以上配置達到目的
1、第一次切換不成功
SYS@RACDB2> alter system archive log current;
$ tail /u01/admin/RACDB/bdump/*.log
Current log# 3 seq# 25 mem# 0: +DG1/racdb/redo03.log
Sun Jul 6 17:02:14 2014
WARNING:NFS file system /u01/rac_arch mounted with incorrect options
WARNING:Expected NFS mount options: rsize>=16384,wsize>=16384,hard,noac/actimeo=0
Sun Jul 6 17:02:14 2014
Errors in file /u01/admin/RACDB/bdump/racdb2_arc1_6756.trc:
ORA-19504: failed to create file "/u01/rac_arch/arch_0000000024_0851859689_0002.arc"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 3
ARC1: Error 19504 Creating archive log file to '/u01/rac_arch/arch_0000000024_0851859689_0002.arc'
2、在兩個節點上重新remount
[root@rac1 ~]# mount -t nfs -o remount,rsize=65534,wsize=65534,hard,noac,actimeo=0 192.168.1.101:/u01/arch
/u01/rac_arch
[root@rac2 ~]# mount -t nfs -o remount,rsize=65534,wsize=65534,hard,noac,actimeo=0 192.168.1.101:/u01/arch
/u01/rac_arch
[root@rac1 ~]# vim fstab
3、第二次切換成功
SYS@RACDB2> alter system archive log current;
[root@rac2 ~]# mount|grep rac_arch
192.168.1.101:/u01/arch on /u01/rac_arch type nfs (rw,hard,nointr,tcp,noac,timeo=600,nolock,addr=192.168.1.101)
192.168.1.101:/u01/arch on /u01/rac_arch type nfs (rw,remount,rsize=65534,wsize=65534,hard,noac,actimeo=0,addr=192.168.1.101)
[root@rac2 ~]# ll /u01/rac_arch
total 1236
-rw-rw---- 1 oracle oinstall 1257984 Jul 6 17:12 arch_0000000022_0851859689_0001.arc
-rw-r--r-- 1 oracle oinstall 0 Jul 6 11:42 oracle_test
4、在rac1-rac2兩個節點上設定開機自動掛載
[root@rac1 ~]# vim /etc/rc.local
mount -t nfs -o remount,rsize=65534,wsize=65534,hard,noac,actimeo=0 192.168.1.101:/u01/arch /u01/rac_arch
[root@rac2 ~]# vim /etc/rc.local
mount -t nfs -o remount,rsize=65534,wsize=65534,hard,noac,actimeo=0 192.168.1.101:/u01/arch /u01/rac_arch
5、reboot兩節點進一步驗證
zcs0237
2014.07.06
More cleaner and more efficient!
1.軟體版本
10.2.0.1.0 on 2.6.18-53.el5
2.測試機器
192.168.1.100 NFS
192.168.1.101 rac1
192.168.1.102 rac2
3.總體流程
-->配置NFS服務(192.168.1.103)
-->在RAC1節點上掛載NFS(192.168.1.101)rac1-rac2兩個節點掛載點路徑一致
-->在RAC2節點上掛載NFS(192.168.1.102)rac1-rac2兩個節點掛載點路徑一致
-->為RAC資料庫開啟歸檔
-->測試、確認以上配置達到目的
4.rsize=20480000,wsize=20480000設定過小,在RMAN備份時會卡住
5.測試結果見樓下,歡迎補充、指正
一、配置NFS服務(192.168.1.103)
1、在一個非常大的檔案系統上建立目錄
$ mkdir /u01/arch
$ ll -d /u01/arch
drwxr-xr-x 2 oracle oinstall 4096 Jul 6 11:01 /u01/arch
2、將該目錄在/etc/exports中共享
# vim /etc/exports
/u01/arch *(rw,sync,no_all_squash)
3、在nfs服務端手動啟動NFS伺服器
# service nfs restart
4、開機自動載入NFS服務
# chkconfig --list nfs
nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
# chkconfig nfs on
二、在RAC1節點上掛載NFS(192.168.1.101)rac1-rac2兩個節點掛載點路徑一致
1、以oracle身份建立NFS的掛載點目錄
[oracle@rac1 ~]$ mkdir /u01/rac_arch
2、以root身份手工掛載NFS目錄
[oracle@rac1 ~]$ su - root
[root@rac1 ~]# mount -t nfs -o rw 192.168.1.101:/u01/arch /u01/rac_arch
[root@rac1 ~]# ls -ld /u01/rac_arch/
drwxr-xr-x 2 oracle oinstall 4096 Jul 6 11:01 /u01/rac_arch/
3、以oracle身份測試NFS共享儲存
[oracle@rac1 ~]$ touch /u01/rac_arch/oracle_1
[oracle@rac1 ~]$ ll /u01/rac_arch/oracle_1
-rw-r--r-- 1 oracle oinstall 0 Jul 6 11:42 /u01/rac_arch/oracle_1
三、在RAC2節點上掛載NFS(192.168.1.102)rac1-rac2兩個節點掛載點路徑一致
1、以oracle身份建立NFS的掛載點目錄
[oracle@rac2 ~]$ mkdir /u01/rac_arch
2、以root身份手工掛載NFS目錄
[root@rac1 ~]# mount -t nfs -o rw 192.168.1.101:/u01/arch /u01/rac_arch
[root@rac1 ~]# ls -ld /u01/rac_arch/
drwxr-xr-x 2 oracle oinstall 4096 Jul 6 11:01 /u01/rac_arch/
3、以oracle身份測試NFS共享儲存
[oracle@rac2 ~]$ touch /u01/rac_arch/oracle_2
[oracle@rac2 ~]$ ll /u01/rac_arch/oracle_2
-rw-r--r-- 1 oracle oinstall 0 Jul 6 11:42 /u01/rac_arch/oracle_2
四、為RAC資料庫開啟歸檔
1、調整歸檔日誌路徑
SYS@RACDB1> alter system set log_archive_dest_1='LOCATION=/u01/rac_arch/';
SYS@RACDB1> show parameter log%_1
--log_archive_dest_1 string LOCATION=/u01/rac_arch
2、調整歸檔日誌檔案命名方式
SYS@RACDB1> alter system set log_archive_format ='arch_%S_%R_%T.arc' scope=spfile;
SYS@RACDB1> select value from v$spparameter where name='log_archive_format';
--arch_%S_%R_%T.arc
--log_archive_format string %t_%s_%r.dbf
%s: 日誌序列號
%S:日誌序列號(帶有前導0)。
%t: 重做執行緒編號。
%T: 重做執行緒編號(帶有前導0)
%a: %A:資料庫ID號
%d: 資料庫ID號
%r: RESETLOGS的id值
3、關閉所有節點資料庫例項
$ srvctl stop database -d RACDB
$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.inst application OFFLINE OFFLINE
ora....B2.inst application ONLINE OFFLINE
ora.RACDB.db application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
4、在其中一個節點上開歸檔
SYS@RACDB1> startup mount
SYS@RACDB1> alter database archivelog;
SYS@RACDB1> alter database open;
5、開啟所有節點資料庫例項
$ srvctl stop database -d RACDB
$ srvctl start database -d RACDB;sleep 60
五、測試、確認以上配置達到目的
1、第一次切換不成功
SYS@RACDB2> alter system archive log current;
$ tail /u01/admin/RACDB/bdump/*.log
Current log# 3 seq# 25 mem# 0: +DG1/racdb/redo03.log
Sun Jul 6 17:02:14 2014
WARNING:NFS file system /u01/rac_arch mounted with incorrect options
WARNING:Expected NFS mount options: rsize>=16384,wsize>=16384,hard,noac/actimeo=0
Sun Jul 6 17:02:14 2014
Errors in file /u01/admin/RACDB/bdump/racdb2_arc1_6756.trc:
ORA-19504: failed to create file "/u01/rac_arch/arch_0000000024_0851859689_0002.arc"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 3
ARC1: Error 19504 Creating archive log file to '/u01/rac_arch/arch_0000000024_0851859689_0002.arc'
2、在兩個節點上重新remount
[root@rac1 ~]# mount -t nfs -o remount,rsize=65534,wsize=65534,hard,noac,actimeo=0 192.168.1.101:/u01/arch
/u01/rac_arch
[root@rac2 ~]# mount -t nfs -o remount,rsize=65534,wsize=65534,hard,noac,actimeo=0 192.168.1.101:/u01/arch
/u01/rac_arch
[root@rac1 ~]# vim fstab
3、第二次切換成功
SYS@RACDB2> alter system archive log current;
[root@rac2 ~]# mount|grep rac_arch
192.168.1.101:/u01/arch on /u01/rac_arch type nfs (rw,hard,nointr,tcp,noac,timeo=600,nolock,addr=192.168.1.101)
192.168.1.101:/u01/arch on /u01/rac_arch type nfs (rw,remount,rsize=65534,wsize=65534,hard,noac,actimeo=0,addr=192.168.1.101)
[root@rac2 ~]# ll /u01/rac_arch
total 1236
-rw-rw---- 1 oracle oinstall 1257984 Jul 6 17:12 arch_0000000022_0851859689_0001.arc
-rw-r--r-- 1 oracle oinstall 0 Jul 6 11:42 oracle_test
4、在rac1-rac2兩個節點上設定開機自動掛載
[root@rac1 ~]# vim /etc/rc.local
mount -t nfs -o remount,rsize=65534,wsize=65534,hard,noac,actimeo=0 192.168.1.101:/u01/arch /u01/rac_arch
[root@rac2 ~]# vim /etc/rc.local
mount -t nfs -o remount,rsize=65534,wsize=65534,hard,noac,actimeo=0 192.168.1.101:/u01/arch /u01/rac_arch
5、reboot兩節點進一步驗證
zcs0237
2014.07.06
More cleaner and more efficient!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/210154/viewspace-1210763/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC歸檔儲存方案:交叉互備
- 資料儲存(歸檔解檔,沙河儲存)
- DRBD + Heratbeat + NFS 高可用檔案共享儲存NFS
- IOS資料儲存之歸檔/解檔iOS
- 使用NFS共享RAC節點的歸檔目錄NFS
- rac歸檔模式/非歸檔模式下檔案建至本地儲存修復方法-ORA-01157模式
- 塊儲存 檔案儲存 物件儲存物件
- 檔案儲存
- 資料儲存--檔案儲存
- NFS共享儲存NFS
- 簡單2步就能將大量檔案歸類儲存
- 咦?Oracle歸檔檔案存哪了?Oracle
- openfiler配置rac共享儲存
- CSV檔案儲存
- Flutter持久化儲存之檔案儲存Flutter持久化
- oracle歸檔日誌儲存路徑的設定Oracle
- oracle rac歸檔使用nfs 導致oracle hungOracleNFS
- Android 檔案儲存Android
- hive檔案儲存格式Hive
- 儲存檔案到本地
- InnoDB儲存引擎檔案儲存引擎
- 06、hdfs檔案儲存
- android: 檔案儲存Android
- 儲存json檔案JSON
- 物件儲存 vs 檔案儲存 vs 塊儲存,選哪個?物件
- NFS共享儲存服務NFS
- 分散式檔案儲存FastDFS(七)FastDFS配置檔案詳解分散式AST
- IOS資料儲存之檔案沙盒儲存iOS
- 如何儲存陣列配置到 PHP 檔案陣列PHP
- 分散式檔案儲存FastDFS(三)FastDFS配置分散式AST
- 使用 Docker 搭建 minio 檔案儲存Docker
- 企業檔案安全儲存
- IPFS的檔案儲存模式模式
- 修改並儲存hosts檔案
- CIFS檔案的儲存————SMB
- centos7配置nfs共享儲存服務CentOSNFS
- Android中的資料儲存之檔案儲存Android
- RAC 設定NFS作為歸檔目錄NFS