AIX RAC配置Flashback Recovery Area

环境:

操作系统:AIX 5300-09

集群软件: CRS 10.2.0.1

数据库: Oracle 10.2.0.1


本案例是用于基于VG Concurrent 的共享存储,通过HACMP 实现卷组的并发

由于共享存储采用了并发卷组,在上面不能建立文件系统;并且Flashback Recover Area亦不能建立在raw上,所以在本地卷组上建立文件系统,通过NFS共享方式来建立Flashback Recover Area。


1、在node1上建立文件系统


[root@aix211 /]#lsvg rootvg

VOLUMEGROUP:rootvgVGIDENTIFIER:00040f8a00004c0000000140c6da55a7VGSTATE:activePPSIZE:128megabyte(s)VGPERMISSION:read/writeTOTALPPs:546(69888megabytes)MAXLVs:256FREEPPs:190(24320megabytes)LVs:17USEDPPs:356(45568megabytes)OPENLVs:16QUORUM:2(Enabled)TOTALPVs:1VGDESCRIPTORS:2STALEPVs:0STALEPPs:0ACTIVEPVs:1AUTOON:yesMAXPPsperVG:32512MAXPPsperPV:1016MAXPVs:32LTGsize(Dynamic):256kilobyte(s)AUTOSYNC:noHOTSPARE:noBBPOLICY:relocatable

[root@aix211 /]#smit crfs

[root@aix211 /]#df -m

FilesystemMBblocksFree%UsedIused%IusedMountedon/dev/hd46144.002070.9467%82111%//dev/hd23072.00911.2671%515097%/usr/dev/hd9var2048.001809.3812%55572%/var/dev/hd32048.001827.3011%3811%/tmp/dev/hd12048.001293.6837%2231%/home/proc-----/proc/dev/hd10opt1024.00702.1732%56043%/opt/dev/lv0015360.002490.8984%335981%/u01/dev/lv01128.00123.944%181%/var/adm/csd/dev/lv024096.003967.394%161%/arch/dev/lv032048.001983.674%171%/dsk1/dev/lv042048.001983.674%171%/dsk2/dev/lv05128.00123.944%171%/flash_rcy

[root@aix211 /]#chown -R oracle:dba /flash_rcy


2、配置Flashback Directory共享

[root@aix211 /]#cat /etc/exports

/soft2 -sec=sys:krb5p:krb5i:krb5:dh,rw,access=aix212:aix199

/flash_rcy -sec=sys:krb5p:krb5i:krb5:dh,rw,root=aix212


3、在node2上配置共享访问Flashback Directory

[root@aix212@ /]#cat/etc/filesystems

/flash_rcy:dev="/flash_rcy"vfs=nfsnodename=192.168.8.211mount=trueoptions=rw,bg,hard,intr,proto=tcp,vers=3,rsize=65536,wsize=65536,timeo=600account=false

[oracle@aix212@ /]$mkdir /flash_rcy

[root@aix212@ /]#ls -ld /flash_rcy

drwxr-sr-x 4 oracle dba 512 Aug 7 15:44 /flash_rcy

[root@aix212@ /]#mount /flash_rcy

[oracle@aix212@ ~]$mount

node mounted mounted over vfs date options

-------- --------------- --------------- ------ ------------ ---------------

192.168.8.211 /flash_rcy /flash_rcy nfs3 Aug 07 15:53 rw,bg,hard,intr,proto=tcp,vers=3,rsize=65536,wsize=65536,timeo=60


4、配置Flashback Recovery Area

SQL>showparameterrecoveryNAMETYPEVALUE-----------------------------------------------------------------------------db_recovery_file_deststring/flash_rcydb_recovery_file_dest_sizebiginteger2G

5、测试Flashback Recovery Area

[oracle@aix212@~]$rmantarget/RecoveryManager:Release10.2.0.1.0-ProductiononThuAug715:53:312014Copyright(c)1982,2005,Oracle.Allrightsreserved.connectedtotargetdatabase:PROD(DBID=266564886,notopen)RMAN>backupcurrentcontrolfile;Startingbackupat07-AUG-14usingchannelORA_DISK_1channelORA_DISK_1:startingfulldatafilebackupsetchannelORA_DISK_1:specifyingdatafile(s)inbackupsetincludingcurrentcontrolfileinbackupsetchannelORA_DISK_1:startingpiece1at07-AUG-14channelORA_DISK_1:finishedpiece1at07-AUG-14piecehandle=/flash_rcy/PROD/backupset/2014_08_07/o1_mf_ncnnf_TAG20140807T155423_9y68o0ff_.bkptag=TAG20140807T155423comment=NONEchannelORA_DISK_1:backupsetcomplete,elapsedtime:00:00:04Finishedbackupat07-AUG-14RMAN>listbackup;ListofBackupSets===================BSKeyTypeLVSizeDeviceTypeElapsedTimeCompletionTime-------------------------------------------------------------1Full10.86MDISK00:00:0407-AUG-14BPKey:1Status:AVAILABLECompressed:NOTag:TAG20140807T155338PieceName:/flash_rcy/PROD/backupset/2014_08_07/o1_mf_ncsnf_TAG20140807T155338_9y68mp2s_.bkpControlFileIncluded:CkpSCN:909245Ckptime:07-AUG-14SPFILEIncluded:Modificationtime:07-AUG-14BSKeyTypeLVSizeDeviceTypeElapsedTimeCompletionTime-------------------------------------------------------------2Full10.83MDISK00:00:0207-AUG-14BPKey:2Status:AVAILABLECompressed:NOTag:TAG20140807T155423PieceName:/flash_rcy/PROD/backupset/2014_08_07/o1_mf_ncnnf_TAG20140807T155423_9y68o0ff_.bkpControlFileIncluded:CkpSCN:909245Ckptime:07-AUG-14

@默认,RMAN备份存储到Flashback Recovery Area,至此Flashbackup Recovery Area配置完成!


错误案例:访问Flashback Recovery Area失败

[oracle@aix212@ ~]$rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Aug 7 15:48:33 2014

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: PROD (DBID=266564886, not open)

RMAN> backup database;

Starting backup at 07-AUG-14

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=151 instance=prod2 devtype=DISK

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/07/2014 15:48:44

ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

continuing other job steps, job failed will not be re-run

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

including current control file in backupset

including current SPFILE in backupset

channel ORA_DISK_1: starting piece 1 at 07-AUG-14

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/07/2014 15:48:47

ORA-19504: failed to create file "/flash_rcy/PROD/backupset/2014_08_07/o1_mf_ncsnf_TAG20140807T154843_%u_.bkp"

ORA-27054: NFS file system where the file is created or resides is not mounted with correct options

Additional information: 6


解决方法:


在/etc/filesystems配置mount参数:

[root@aix212@ /]#cat/etc/filesystems

/flash_rcy:dev="/flash_rcy"vfs=nfsnodename=192.168.8.211mount=trueoptions=rw,bg,hard,intr,proto=tcp,vers=3,rsize=65536,wsize=65536,timeo=600account=false

@重新mount后,问题解决 !