分类: Oracle
2009-01-09 01:23:48
RMAN> sql 'alter database begin backup'; |
[root@oem2 ~]# drbdadm disconnect r0 [root@oem2 ~]# drbdadm cstate r0 StandAlone [root@oem2 ~]# ls /u02/ lost+found/ o102db1admin/ o102db1data/ |
[root@oem3 ~]# drbdadm disconnect r0 [root@oem3 ~]# drbdadm cstate r0 StandAlone [root@oem3 ~]# drbdadm primary r0 [root@oem3 ~]# mount /dev/drbd0 /u02 [root@oem3 ~]# ls /u02 lost+found o102db1admin o102db1data [root@oem3 ~]# |
RMAN> sql ' alter system archive log current'; sql statement: alter system archive log current RMAN> Copy current controlfile to '/u03/control_start'; Starting backup at 19-DEC-08 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=139 devtype=DISK channel ORA_DISK_1: starting datafile copy copying current control file output filename=/u03/control_start tag=TAG20081219T012016 recid=1 stamp=673838421 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07 Finished backup at 19-DEC-08 RMAN> Copy current controlfile to '/u03/control_backup'; Starting backup at 19-DEC-08 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy copying current control file output filename=/u03/control_backup tag=TAG20081219T012049 recid=2 stamp=673838455 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07 Finished backup at 19-DEC-08 RMAN> resync catalog; starting full resync of recovery catalog full resync complete |
[root@oem2 ~]# drbdadm disconnect r1 [root@oem2 ~]# drbdadm cstate r1 StandAlone |
[root@oem3 ~]# drbdadm disconnect r1 [root@oem3 ~]# drbdadm cstate r1 StandAlone [root@oem3 ~]# drbdadm primary r1 [root@oem3 ~]# mount /dev/drbd1 /u03/ [root@oem3 ~]# |
[oracle@oem3 dbs]$ rman target / catalog rman/rman@rman Recovery Manager: Release 10.2.0.1.0 - Production on Fri Dec 19 01:48:26 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database (not started) connected to recovery catalog database RMAN> startup mount Oracle instance started database mounted Total System Global Area 285212672 bytes Fixed Size 1218992 bytes Variable Size 92276304 bytes Database Buffers 188743680 bytes Redo Buffers 2973696 bytes RMAN> BACKUP FORMAT '/u01/app/oracle/backup/ctl%d_%s_%p_%t' controlfilecopy '/u03/control_start'; Starting backup at 19-DEC-08 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=157 devtype=DISK channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input control file copy name=/u03/control_start channel ORA_DISK_1: starting piece 1 at 19-DEC-08 channel ORA_DISK_1: finished piece 1 at 19-DEC-08 piece handle=/u01/app/oracle/backup/ctlO102DB1_6_1_673840141 tag=TAG20081219T014901 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04 Finished backup at 19-DEC-08 RMAN-06497: WARNING: control file is not current, control file autobackup skipped RMAN> backup incremental level 0 format '/u01/app/oracle/backup/db%d_%s_%p_%t' (datafile '/u01/app/oracle/oradata/o102db1/testbk01.dbf' ); Starting backup at 19-DEC-08 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=157 devtype=DISK RMAN-06554: WARNING: file 7 is in backup mode channel ORA_DISK_1: starting incremental level 0 datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00007 name=/u01/app/oracle/oradata/o102db1/testbk01.dbf channel ORA_DISK_1: starting piece 1 at 19-DEC-08 channel ORA_DISK_1: finished piece 1 at 19-DEC-08 piece handle=/u01/app/oracle/backup/dbO102DB1_9_1_673844707 tag=TAG20081219T030506 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15 Finished backup at 19-DEC-08 RMAN-06497: WARNING: control file is not current, control file autobackup skipped RMAN> backup format '/u01/app/oracle/backup/ar%d_%s_%p_%t' (archivelog all); Starting backup at 19-DEC-08 using channel ORA_DISK_1 channel ORA_DISK_1: starting archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=16 recid=14 stamp=673838220 channel ORA_DISK_1: starting piece 1 at 19-DEC-08 channel ORA_DISK_1: finished piece 1 at 19-DEC-08 piece handle=/u01/app/oracle/backup/arO102DB1_8_1_673841029 tag=TAG20081219T020349 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07 Finished backup at 19-DEC-08 RMAN-06497: WARNING: control file is not current, control file autobackup skipped RMAN> shutdown ; database dismounted Oracle instance shut down RMAN> exit Recovery Manager complete. [oracle@oem3 dbs]$ |
[root@oem2 o102db1data]# drbdadm connect r0 [root@oem2 o102db1data]# drbdadm connect r1 |
[root@oem3 db_2]# umount /u02 [root@oem3 db_2]# umount /u03 [root@oem3 db_2]# drbdadm standby r0 Unknown command 'standby'. [root@oem3 db_2]# drbdadm secondary r0 [root@oem3 db_2]# drbdadm secondary r1 [root@oem3 db_2]# drbdadm -- --discard-my-data connect r0 [root@oem3 db_2]# cat /proc/drbd version: 8.2.6 (api:88/proto:86-88) GIT-hash: 3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4 build by buildsvn@c5-x8664-build, 2008-10-03 11:30:17 0: cs:SyncTarget st:Secondary/Primary ds:Inconsistent/UpToDate C r--- ns:0 nr:812 dw:2803904 dr:899786 al:23 bm:116 lo:4 pe:2153 ua:3 ap:0 oos:47784 [>...................] sync'ed: 8.4% (47784/48500)K finish: 0:08:57 speed: 76 (76) K/sec 1: cs:StandAlone st:Secondary/Unknown ds:UpToDate/DUnknown r--- ns:0 nr:37432 dw:568272 dr:37982 al:12 bm:41 lo:0 pe:0 ua:0 ap:0 oos:2508 [root@oem3 db_2]# cat /proc/drbd version: 8.2.6 (api:88/proto:86-88) GIT-hash: 3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4 build by buildsvn@c5-x8664-build, 2008-10-03 11:30:17 0: cs:SyncTarget st:Secondary/Primary ds:Inconsistent/UpToDate C r--- ns:0 nr:25376 dw:2820396 dr:899786 al:23 bm:117 lo:259 pe:1324 ua:257 ap:0 oos:31300 [=======>............] sync'ed: 41.7% (31300/48500)K finish: 0:00:26 speed: 1,176 (636) K/sec 1: cs:StandAlone st:Secondary/Unknown ds:UpToDate/DUnknown r--- ns:0 nr:37432 dw:568272 dr:37982 al:12 bm:41 lo:0 pe:0 ua:0 ap:0 oos:2508 [root@oem3 db_2]# drbdadm -- --discard-my-data connect r1 [root@oem3 db_2]# cat /proc/drbd version: 8.2.6 (api:88/proto:86-88) GIT-hash: 3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4 build by buildsvn@c5-x8664-build, 2008-10-03 11:30:17 0: cs:SyncTarget st:Secondary/Primary ds:Inconsistent/UpToDate C r--- ns:0 nr:38432 dw:2839092 dr:899786 al:23 bm:119 lo:266 pe:668 ua:265 ap:0 oos:12608 [==============>.....] sync'ed: 75.0% (12608/48500)K finish: 0:00:12 speed: 940 (812) K/sec 1: cs:WFBitMapT st:Secondary/Primary ds:UpToDate/UpToDate C r--- ns:0 nr:0 dw:568272 dr:37982 al:12 bm:41 lo:1 pe:0 ua:0 ap:0 oos:2508 [root@oem3 db_2]# cat /proc/drbd version: 8.2.6 (api:88/proto:86-88) GIT-hash: 3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4 build by buildsvn@c5-x8664-build, 2008-10-03 11:30:17 0: cs:SyncTarget st:Secondary/Primary ds:Inconsistent/UpToDate C r--- ns:0 nr:46968 dw:2842172 dr:899786 al:23 bm:120 lo:452 pe:137 ua:451 ap:0 oos:9528 [===============>....] sync'ed: 83.4% (9528/48500)K finish: 0:00:10 speed: 856 (792) K/sec 1: cs:SyncTarget st:Secondary/Primary ds:Inconsistent/UpToDate C r--- ns:0 nr:0 dw:568272 dr:37982 al:12 bm:41 lo:2 pe:235 ua:0 ap:0 oos:2508 [===================>] sync'ed:100.0% (2508/2508)K finish: 0:00:18 speed: 0 (0) K/sec [root@oem3 db_2]# cat /proc/drbd version: 8.2.6 (api:88/proto:86-88) GIT-hash: 3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4 build by buildsvn@c5-x8664-build, 2008-10-03 11:30:17 0: cs:SyncTarget st:Secondary/Primary ds:Inconsistent/UpToDate C r--- ns:0 nr:48560 dw:2851580 dr:899786 al:23 bm:122 lo:28 pe:0 ua:27 ap:0 oos:148 [===================>] sync'ed:100.0% (148/48500)K finish: 0:00:00 speed: 1,852 (892) K/sec 1: cs:SyncTarget st:Secondary/Primary ds:Inconsistent/UpToDate C r--- ns:0 nr:1848 dw:568276 dr:37982 al:12 bm:41 lo:171 pe:63 ua:171 ap:0 oos:2504 [===================>] sync'ed:100.0% (2504/2508)K finish: 0:00:50 speed: 0 (0) K/sec [root@oem3 db_2]# cat /proc/drbd version: 8.2.6 (api:88/proto:86-88) GIT-hash: 3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4 build by buildsvn@c5-x8664-build, 2008-10-03 11:30:17 0: cs:Connected st:Secondary/Primary ds:UpToDate/UpToDate C r--- ns:0 nr:48588 dw:2851776 dr:899786 al:23 bm:123 lo:1 pe:0 ua:0 ap:0 oos:0 1: cs:Connected st:Secondary/Primary ds:UpToDate/UpToDate C r--- ns:0 nr:2508 dw:570780 dr:37982 al:12 bm:44 lo:1 pe:0 ua:0 ap:0 oos:0 [root@oem3 db_2]# |