搭建dg执行duplicate时报错ORA-27052、ORA-17628

问题描述:搭建dg执行duplicate时报错ORA-27052ORA-17628,如下所示:
环境:oracle 11.2.0.4
1、问题重现
Thu Dec 01 14:06:16 2022
Errors in file /u01/app/oracle/diag/rdbms/simdg/simdg/trace/simdg_ora_27197.trc:
ORA-27052: unable to flush file data
Linux-x86_64 Error: 5: Input/output error
Additional information: 1

说明:尝试多次duplicate都报此告警,活动复制时备库数据文件目录中会生成文件,但没过多久生成的文件便会消失,又去生成第二个文件,接着第二个文件也会消失.
2、解决过程
--查权限
[oracle@simdg data]$ ls -ltr
总用量 0
drwxrwxr-x. 2 oracle oinstall 6 12月 1 00:17 fast_recovery_area
drwxrwxr-x. 2 oracle oinstall 6 12月 1 00:18 archive
drwxrwxr-x. 2 oracle oinstall 48 12月 1 13:53 simdb
drwxr-xr-x. 2 oracle oinstall 6 12月 1 14:28 simdg
--系统日志确认到该异常
mount: /dev/mapper/centos-data:不能读超级块
--修复以上异常后继续duplicate,会生成simdat01.dbf文件
[oracle@simdg simdb]$ ll
总用量 11771680
-rwxrwxr-x. 1 oracle oinstall 12992512 12月 1 17:38 control01.ctl
-rwxrwxr-x. 1 oracle oinstall 12992512 12月 1 17:38 control02.ctl
-rw-r----- 1 oracle oinstall 34359730176 12月 1 17:38 simdat01.dbf
--复制第二个文件simdat02.dbf时,第一个文件simdat01.dbf再次消失
[oracle@simdg simdb]$ ls -ltr
总用量 5047072
-rwxrwxr-x. 1 oracle oinstall 12992512 12月 1 17:43 control01.ctl
-rwxrwxr-x. 1 oracle oinstall 12992512 12月 1 17:43 control02.ctl
-rw-r----- 1 oracle oinstall 34359730176 12月 1 17:43 simdat02.dbf
说明:该问题依然存在.
--备库打过与主库相同的补丁.
--备库补丁
[oracle@simdg simdb]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch lspatches
33477185;Database Patch Set Update : 11.2.0.4.220118 (33477185)

OPatch succeeded.
--主库补丁
[oracle@simdb ~]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch lspatches
33477185;Database Patch Set Update : 11.2.0.4.220118 (33477185)

OPatch succeeded.
--trace日志依然报此错
Starting backup at 01-DEC-22
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/data/simdb/simdat01.dbf
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 12/01/2022 17:42:19
ORA-17628: Oracle error 27052 returned by remote Oracle server
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=/data/simdb/simdat02.dbf
--确认磁盘扇区,发现备为512字节扇区
[root@simdg ~]# fdisk -lu /dev/vda

磁盘 /dev/vda:751.6 GB, 751619276800 字节,1468006400 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x000c82ba

设备 Boot Start End Blocks Id System
/dev/vda1 * 2048 2099199 1048576 83 Linux,
/dev/vda2 2099200 1468006399 732953600 8e Linux LVM
--主库扇区
[root@simdb ~]# fdisk -lu /dev/sda

Disk /dev/sda: 1198.0 GB, 1197998080000 bytes, 2339840000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00072aec

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 2339839999 1168870400 8e Linux LVM

注意:发现主库是4K扇区文件,而虚拟机中的备库是512字节扇区,不支持4K扇区磁盘.

解决方案:
此后更换备库磁盘,异常解除.