今天在做11GR2 RAC环境中,OCR磁盘被拿走的实验时,在restore ASM磁盘组的原数据时,遇到了下面的奇怪的错误。
测试环境是:OS REDHAT 5.6 X86_64 OS :11.2.0.2 (RAC)
1.备份OCR DISKGROUP原数据。
- [grid@11rac1 ~]$ asmcmd md_backup /home/grid/ocrbackup -G 'OCR';
- Disk group metadata to be backed up: OCR
- Current alias directory path: POWER/PARAMETERFILE
- Current alias directory path: test
- Current alias directory path: test/ASMPARAMETERFILE
- Current alias directory path: test/OCRFILE
- Current alias directory path: POWER
2.DD掉OCR盘
- [root@11rac1 ~]# dd if=/dev/zero of=/dev/asm-diskb bs=1024M count=1111
- dd: writing `/dev/asm-diskb': No space left on device
- 2+0 records in
- 1+0 records out
- 1073741824 bytes (1.1 GB) copied, 23.5048 seconds, 45.7 MB/s
3.关闭CLUSTER与启动CLUSTER到excl
中间一些步骤这里就不发出现了,将会在另一篇中专门讲OCR盘被拿走的处理。
- [root@11rac1 ~]# crsctl stop has -f
- [root@11rac1 ~]# crsctl start crs -excl -nocrs
4.还原OCR DISKGROUP原数据
- [grid@11rac1 ~]$ asmcmd md_restore /home/oracle/ocrbackup --full --silent -G 'OCR'
- ASMCMD-09345: could not open intermediate file '/home/oracle/ocrbackup'
- Permission denied
- #这里报权限不够,文件是由grid这个用户生成的,也是在grid这个用户下面。
- #查看一下权限
- [grid@11rac1 ~]$ ls -l
- total 40
- -rw-r--r-- 1 grid oinstall 11570 Sep 20 16:22 march
- -rw-r--r-- 1 grid oinstall 10354 Sep 20 17:08 mocr
- -rw-r--r-- 1 grid oinstall 11073 Sep 22 18:26 ocrbackup
- drwxr-xr-x 3 grid oinstall 4096 Sep 17 11:16 oradiag_grid
- #修改权限到777
- [grid@11rac1 ~]$ chmod 777 ocrbackup
- #还是报错误
- [grid@11rac1 ~]$ asmcmd md_restore /home/oracle/ocrbackup --full --silent -G 'OCR'
- ASMCMD-09345: could not open intermediate file '/home/oracle/ocrbackup'
- Permission denied
- [grid@11rac1 ~]$ ls -l
- total 40
- -rw-r--r-- 1 grid oinstall 11570 Sep 20 16:22 march
- -rw-r--r-- 1 grid oinstall 10354 Sep 20 17:08 mocr
- -rwxrwxrwx 1 grid oinstall 11073 Sep 22 18:26 ocrbackup
- drwxr-xr-x 3 grid oinstall 4096 Sep 17 11:16 oradiag_grid
- #再次执行也是报错误
- [grid@11rac1 ~]$ asmcmd md_restore /home/oracle/ocrbackup --full --silent -G 'OCR'
- ASMCMD-09345: could not open intermediate file '/home/oracle/ocrbackup'
- Permission denied
- #找到google.metalink都没有相关的报错,没有办法了。
- #突然想到把它移到到/tmp下面试一下,结果成功了。
- [grid@11rac1 ~]$ mv ocrbackup /tmp
- [grid@11rac1 ~]$ asmcmd md_restore /tmp/ocrbackup --full --silent -G 'OCR'
- Current Diskgroup metadata being restored: OCR
- Diskgroup OCR created!
- System template ONLINELOG modified!
- System template AUTOBACKUP modified!
- System template CONTROLFILE modified!
- System template DATAGUARDCONFIG modified!
- System template CHANGETRACKING modified!
- System template DUMPSET modified!
- System template BACKUPSET modified!
- System template DATAFILE modified!
- System template ASMPARAMETERFILE modified!
- System template FLASHBACK modified!
- System template OCRFILE modified!
- System template FLASHFILE modified!
- System template PARAMETERFILE modified!
- System template TEMPFILE modified!
- System template XTRANSPORT modified!
- System template ARCHIVELOG modified!
- Directory +OCR/test re-created!
- Directory +OCR/POWER re-created!
- Directory +OCR/test/OCRFILE re-created!
- Directory +OCR/test/ASMPARAMETERFILE re-created!
- Directory +OCR/POWER/PARAMETERFILE re-created!
- #还原已经成功。
这就是这个奇怪的错误。不知道是什么原因。
本文转自7343696 51CTO博客,原文链接:http://blog.51cto.com/luoping/1003337,如需转载请自行联系原作者