暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
Oracle报错篇 ORA-01378 磁盘扇区大小不兼容问题.pdf
128
4页
1次
2024-03-23
5墨值下载
Oracle报错篇 ORA-01378 磁盘扇区大小不兼容问题
欢迎关注数据库运维之道公众号,一起学习数据库技术!
本期将为大家分享“ORA-01378 磁盘扇区大小不兼容报错的问题解决方案。
关键词:ORA-01378_disk_sector_size_override4K Online Redo Log /4K Sector Disks
近日,为了验证数据库备份的有效性,尊贵的DBArhel 7.4系统上的Oracle数据库备份通过异机恢复
方式还原到oel 6.8的操作系统上,其中控制文件、数据文件恢复还原都很顺利。但是当执行alter
database open resetlogs命令出现ORA-01378错误。报错内容为:ORA-01378: The logical block size
(4096) of file /u01/app/oracle/oradata/ywzd/ywzd/onlinelog/o1_mf_1_%u_.log is not compatible with
the disk sector size (media sector size is 512 and host sector size is 512)
1)使用oerr命令查看错误编号对应具体的描述、原因和解决方式。这个错误表明redo日志文件
的块大小和磁盘扇区大小不兼容,两者之间存在一定的尺寸差距。进一步检查操作系统的磁盘逻辑和
物理扇区大小是否为512字节。
2)根据上面的错误信息可以知道在线日志文件存放到/u01目录,而/u01/建在根目录下,进一步
定位到逻辑卷。然后通过fdisk命令看到这个磁盘的逻辑和物理扇区大小值为512 bytes
$oerr ora 01378 1
01378, 00000, "The logical block size(%s) of file %s is not compatible 2
with the disk sector size (media sector sizeis %s and host sector size is %s)" 3
*Cause: One of the following occurred: 4
(1) An attempt was made to create a file. 5
(2) A file was moved to disks with different sector size.// 6
*Action: Create file or move file to the proper disk.7
[root@db2 ~]# df -h 1
Filesystem Size Used Avail Use% Mounted on 2
/dev/mapper/vg_hfyldb1-LogVol01 3
1.1T 760G 297G 72% /4
3)查看看源库在线日志文件的blocksize大小值为4096
4)默认情况下,数据库在线重做日志文件的块大小为512字节。从Oracle数据库11.2版本开始,
可以通过BLOCKSIZE子句将其更改为51210244096。例如:
ALTER DATABASE ADD LOGFILE GROUP 5 SIZE 100M BLOCKSIZE 4096;
5)但是,在创建重做日志时,Oracle会进行检查以确保底层设备具有匹配的扇区大小。对于本
机模式设备,检查将成功,并且将创建重做日志。但是对于模拟模式设备,它实际上是假装为512
节,检查失败。
5
# lvs 6
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync
Convert
7
LogVol01 vg_hfyldb1 -wi-ao---- 1.09t
8
9
# fdisk -l 10
Disk /dev/mapper/vg_hfyldb1-LogVol01: 1201.4 GB, 1201366106112 bytes 11
255 heads, 63 sectors/track, 146057 cylinders 12
Units = cylinders of 16065 * 512 = 8225280 bytes 13
Sector size (logical/physical): 512 bytes / 512 bytes 14
I/O size (minimum/optimal): 512 bytes / 512 bytes 15
> select group#,members,blocksize from v$log; 1
2
GROUP# MEMBERS BLOCKSIZE 3
---------- ---------- ---------- 4
1 1 4096 5
2 1 4096 6
3 1 4096 7
4 1 4096 8
5 1 4096 9
6 1 4096 10
11
of 4
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文档被以下合辑收录

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜