开源中文网

您的位置: 首页 > IBM Aix > 正文

AIX文件系统挂载故障一例

来源:  作者:

正在出差,收到邮件说某个项目组使用的aix的文件系统无法挂载。上去一看果然:  [root:ibm520#/]mount /app

Replaying log for /dev/app.
mount: 0506-324 Cannot mount /dev/app on /app: The media is not formatted or the format is not correct.
0506-342 The superblock on /dev/app is dirty.  Run a full fsck to fix.

看到这个提示,觉得很简单,检查修复吧:

[root:ibm520#/]fsck /dev/app

The current volume is: /dev/app
Primary superblock is valid.
J2_LOGREDO:log redo processing for /dev/app

The current volume is: /dev/app
Primary superblock is valid.
J2_LOGREDO:log redo processing for /dev/app
i/o error log reading page 0xc24
logRead: logwrap
log wrapped...
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.
[root:ibm520#/]

再次尝试挂载文件系统:

[root:ibm520#/]mount /app
Replaying log for /dev/app.
mount: 0506-324 Cannot mount /dev/app on /app: The media is not formatted or the format is not correct.

从网上搜了一篇文章,觉得有帮助:

http://fanhongjie.itpub.net/post/1879/461900

从上面的输出可以看到,是redolog时日志文件有问题。建立一个新的日志文件系统,然后将文件系统的日志文件系统连接到新的日志文件系统。

[root:ibm520#/]mklv -t jfs2log -y loglv05 datavg 1
loglv05
[root:ibm520#/]chfs -a dev=/dev/app -a log=/dev/loglv05 /app
chfs: /dev/loglv05 is not a jfs2 log type

lsvg -l查看,明明是建立的jfs2log么,怎么会不对? 找了半天原来是没有格式化新建的文件系统,基础没打好啊。

[root:ibm520#/]logform /dev/loglv05
logform: destroy /dev/rloglv05 (y)?y
[root:ibm520#/]chfs -a dev=/dev/app -a log=/dev/loglv05 /app
[root:ibm520#/]mount /app
[root:ibm520#/]ls /app

哈,文件系统挂上了,数据看到了,收工。

有人说过,好记性不如烂笔头,是为记。

Tags:故障 文件 系统
关于开源中文网 - 联系我们 - 广告服务 - 网站地图 - 版权声明