yuyulu
作者yuyulu2011-04-28 11:58
系统工程师, 自由职业

日志文件系统错误导致数据库无法启动

字数 2717阅读 6791评论 0赞 1
1、环境
   主机:P520 AIX 5308
   存储:DS4500
   数据库Oracle 9.2.0.8

某天用户打电话过来说数据库没办法启动,还好有VPN可以远程操作。
1)登陆后习惯性的ERRPT,没有硬件故障。
2)lspv存储盘状态正常。
3)df -g查看硬盘使用率,发现在Oracle安装目录没有Mount起来,数据库肯定无法启动。
4)mount /oracle问题就出现了,错误如下:
# mount /oracle
Replaying log for /dev/fslv02.
mount: 0506-324 Cannot mount /dev/fslv02 on /oracle: The media is not formatted
or the format is not correct.
0506-342 The superblock on /dev/fslv02 is dirty.  Run a full fsck to fix.
5)问题中已经有提示,运行fsck /dev/fslv02
#fsck /dev/fslv02
The current volume is: /dev/fslv02
Primary superblock is valid.
J2_LOGREDO:log redo processing for /dev/fslv02
The current volume is: /dev/fslv02
Primary superblock is valid.
J2_LOGREDO:log redo processing for /dev/fslv02
i/o error log reading page 0xc24
logRead: logwrap
log wrfslv02ed...
j2_logredo.cpp: ERROR in replayLog line 1062, nextaddr negative
log read failed 0xc25030
j2_logredo.cpp: ERROR in j2_logredo line 789, replayLog
j2_logredo.cpp: ERROR in j2_logredo line 858, superblock will not be marked.
j2_logredo.cpp: ERROR in j2_logredo line 858, superblock will not be marked.
logredo: log rec bad or i/o error...logFormatting...
j2_logform:open failed, errno:16
failure in logformat
logredo: logform failed
Failure replaying log: -3
exec module "/sbin/helpers/jfs2/logredo64" failed.
logredo failed (rc=253).  fsck continuing.
Primary superblock is valid.
*** Phase 1 - Initial inode scan
Directory inode 426497 has a node with an invalid sorting table; FIX? Y
Superblock marked dirty because repairs are about to be written.
Directory inode 532747 has a node with an invalid sorting table; FIX? Y
*** Phase 2 - Process remaining directories
*** Phase 3 - Process remaining files
*** Phase 4 - Check and repair inode allocation map
File system inode map is corrupt; FIX? Y
*** Phase 5 - Check and repair block allocation map
Block allocation map is corrupt; FIX? Y
Inodes not connected to the root directory
         tree have been detected.  Will reconnect.
File system is clean.
Superblock is marked dirty; FIX? Y
All observed inconsistencies have been repaired.
#
再次尝试挂载文件系统:
#mount /oracle
Replaying log for /dev/fslv02.
mount: 0506-324 Cannot mount /oracle on /fslv02: The media is not formatted or the format is not correct.
从网上搜了一篇文章,觉得有帮助:
http://fanhongjie.itpub.net/post/1879/461900
从上面的输出可以看到,是redolog时日志文件有问题。建立一个新的日志文件系统,然后将文件系统的日志文件系统连接到新的日志文件系统。
#mklv -t jfs2log -y loglv05 datavg 1
loglv05
#chfs -a dev=/dev/fslv02 -a log=/dev/loglv05 /fslv02
chfs: /dev/loglv05 is not a jfs2 log type
lsvg -l查看,明明是建立的jfs2log么,怎么会不对? 找了半天原来是没有格式化新建的文件系统,基础没打好啊。
#logform /dev/loglv05
logform: destroy /dev/rloglv05 (y)?y
#chfs -a dev=/dev/fslv02 -a log=/dev/loglv05 /fslv02
#mount /oracle
#ls /oracle
哈,文件系统挂上了,数据看到了,收工。

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

1

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广