Oracle备库alert日志中有如下报错:
lave exiting with ORA-1115 exception
Errors in file /u01/app/oracle/diag/rdbms/dbrsh/dbrsh/trace/dbrsh_pr0h_54461338.trc:
ORA-01115: IO error reading block from file 219 (block # 1903493)
ORA-01110: data file 219: '/gzdata01/YDBR/datafile/tbs_prod_idx1.1295.925345445'
ORA-27063: number of bytes read/written is incorrect
IBM AIX RISC System/6000 Error: 110: Media surface error
Additional information: -1
Additional information: 8192
因IO报错导致备库mrp进程终止,并且主机日志中有存储链路报错,底层有硬盘损坏,但是修好了硬盘之后,已经损坏的数据文件还是没办法自己恢复
需要从写库或者好的读库上备份对应的数据文件:
RMAN> backup datafile 219,220 format '/data2/backup/df_%d_%T_%U';
注册到备库的控制文件中:
CATALOG BACKUPPIECE '/data/bak/backupset';
list backupset summary;
刚开始尝试blockrecover提示恢复成功,但是问题并没有解决,看来要恢复整个数据文件了。
先备份损坏数据文件,发现mv失败,因为空间不够,删除掉
$ mv /gzdata01/YDBR/datafile/bak_tbs_prod_idx1.1295.925345445 /ptfs/rman
mv: /gzdata01/YDBR/datafile/bak_tbs_prod_idx1.1295.925345445: The media surface is damaged.
mount状态下
RMAN> restore datafile 219;
restore完成数据文件之后,备库不用recover,直接open或者打开mrp进程,备库会自动进行media recover