上星期文件系统/u01满90%了,就想去清理一下。
后来发现udump下产生大量的trace文件,都在报File '/dev/async' notpresent : errno=2这个错,但这些错误不会出现在alert日志中,内容如下:
rac:/u01/oracle/admin/edb/udump>$moreedb1_ora_10008.trc
File '/dev/async' not present : errno=2
/u01/oracle/admin/edb/udump/edb1_ora_10008.trc
Oracle Database10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real ApplicationClusters, OLAP, Data Mining
and Real Application Testing options
ORACLE_HOME = /u01/oracle/product/10.2.0/db
System name: HP-UX
Node name: rac
Release: B.11.11
Version: U
Machine: 9000/800
Instance name: edb1
Redo thread mounted by this instance: 1
Oracle process number: 0
Unix process pid: 10008, image: oracle@rac
原因:
查了下metalink,说是在HP-Unix上数据库升级到10g之后,async I/O是自动开启的(DISK_ASYNCH_IO参数为true),但是由于在OS层没有配置async I/O(即没有/dev/async这个文件),那么就会产生trace文件,报这个File '/dev/async' not present : errno=2错误。
解决方法有两种:
1、创建/dev/async
Create '/dev/async' to suppress theseerrors. To create '/dev/async', you need to do the following as root:
/sbin/mknod /dev/async c 101 0x0
/usr/bin/chown oracle:dba /dev/async
/usr/bin/chmod 000 /dev/async
或者
2、关闭数据库层的async I/O
Disable async at the database level. Youshould set the following parameters as follows:
disk_asynch_io = FALSE (in the init.ora file (or spfile))
filesystemio_options = <value>
restart the instance
The <value> of filesystemio_optionsmay be any of the following:
"asynch" - Set by default. Thisallows asynchronous IO to be used where supported by the OS.
"directIO" - This allows directIOto be used where supported by the OS. Direct IO bypasses any
Unix buffer cache.
"setall" - Enables both ASYNC andDIRECT IO.
"none" - This disables ASYNC IOand DIRECT IO so that Oracle uses normal synchronous writes, without any directio options.
You shouldconsult your SA to find out supported option and select that.
However, this parameter should not normallybe set by the user. It is mainly here to help avoid OS
bugs / problems by disabling certain typesof IO. You should modify this ONLY if you had this set earlier. Otherwise, justsetting disk_asynch_io should be okay.
后来发邮件问了下乙方,他说:
async io能够在以下方面提升性能
l IO队列不需要等待所以磁盘可以对零散的IO进行组织以相对次数较少的io以提升性能。(吞吐量的提升)
l 进程可在等待IO完成前执行另外的任务以提升性能。(响应时间的改善)
生产系统,操作系统如果支持异步IO的,我们建议还是开启异步IO
但是《ALERT:HP-UX: RDBMS May Not Start if Async Disk Driveris Configured (文档 ID 174487.1)》上说,如果在操作系统配置async IO可能会导致数据库起不来,感觉风险有点大,再说我们现在IO也还可以,还是选择第二种方案比较保险。等下次停机的时候再改disk_asynch_io这个参数,看看情况再说。
后来JJ师父说修改disk_asynch_io这个参数也可能会有问题,反正现在没有什么影响,就让它去,大不了就定期删下trace文件,清理下udump。
本文记录了解决HP-UX环境下Oracle 10g数据库因async I/O配置不当导致的错误。主要介绍了错误产生的原因及两种解决方案:创建/dev/async设备文件或在数据库级别禁用async I/O。
832

被折叠的 条评论
为什么被折叠?



