免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 589 | 回复: 7
打印 上一主题 下一主题

/var(ext3) was down! 如何修复?(或者ext3如此劣质) [复制链接]

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-07-18 15:00 |只看该作者 |倒序浏览
Redhat AS3
SCSI
单用户文件修复模式:
所有的挂载点已经umonut

fsck /var -fy
提示:
Group descriptors look bad   ; try backup blocks
fsck.ext3 : Invalid arauments while checking ext3 journal for /var



fstab之中:
LABEL=/var /var exts defaults 1 2



真不知道,Linux的文件系统怎么这么劣质,因为硬盘空间满了,居然导致出现了这样的问题;还有掉电也会出现这样子的问题;实在是太劣质了。

论坛徽章:
0
2 [报告]
发表于 2005-07-18 15:02 |只看该作者

/var(ext3) was down! 如何修复?(或者ext3如此劣质)

我用了 2 年了,中间硬盘满过几次,突然掉电无数次,也没出现你这样的问题啊。。。

我认为也许是你的 scsi 驱动不好所导致的

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
3 [报告]
发表于 2005-07-18 15:10 |只看该作者

/var(ext3) was down! 如何修复?(或者ext3如此劣质)

驱动不好那我敢用啊?

我用的ReadHat本身支持的SCSI设备:
Adapter AIC7XXX
aic 7896/97 Ultra2 SCSI

又不是自己安装的驱动,用这个SCSI直接安装的Readhat

论坛徽章:
0
4 [报告]
发表于 2005-07-18 15:12 |只看该作者

/var(ext3) was down! 如何修复?(或者ext3如此劣质)

fsck /dev/xxx
试试看,不加 -y ,看有啥提示,然后根据提示自行处理一下

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
5 [报告]
发表于 2005-07-18 15:18 |只看该作者

/var(ext3) was down! 如何修复?(或者ext3如此劣质)

早就测试过了;
fsck
/ ................  完全正常

fsck /dev/sda3
出现上面的错误提示

论坛徽章:
0
6 [报告]
发表于 2005-07-18 15:22 |只看该作者

/var(ext3) was down! 如何修复?(或者ext3如此劣质)

邪门。。。。。
帮你关注一下

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
7 [报告]
发表于 2005-07-18 15:22 |只看该作者

/var(ext3) was down! 如何修复?(或者ext3如此劣质)

互连网搜索结果:

http://www.longwin.com.tw/~jon/blog/archives/000587.html

修復ext3文件系统的超级塊
I just got my blog back after wrestling with a hosed ext3 partition, and winning. Long story short, I put some bad ram into Adrock which quickly caused a kernel panic. Upon removing the bad RAM and rebooting /var was toast, the journal was toast and it looked like the superblocks were a bit charred as well. I had to dig for a while to get this problem solved... so here's the info on the failure and the fix.

/var was unmountable.
I removed /var from fstab and booted the machine on a /var dir off the root so I could work on it remotely.

Here's what happened next. I fsck a variety of ways, fsck.ext3 etc.. each reported the same:
fsck /dev/ida/c0d0p7
fsck 1.27 (8-Mar-2002)
e2fsck 1.27 (8-Mar-2002)
Group descriptors look bad... trying backup blocks...
fsck.ext2: Invalid argument while checking ext3 journal for /var

Tried downgrading to ext2 to bypass the hosed journal issues:

tune2fs -O ^has_journal /dev/ida/c0d0p7
tune2fs 1.27 (8-Mar-2002)
tune2fs: Invalid argument while reading journal inode

No good. Tried mounting as ext2 read only:

mount -t ext2 /dev/ida/c0d0p7 /mnt -o ro
mount: wrong fs type, bad option, bad superblock on /dev/ida/c0d0p7,
or too many mounted file systems

Nada. Tried some more stuff... tune2fs, and debugfs to try to fix / disable the journal, then decided I'd better back up the partition... should have done that first!

e2fsck -c /dev/ida/c0d0p7
e2fsck 1.27 (8-Mar-2002)
Group descriptors look bad... trying backup blocks...
e2fsck: Invalid argument while checking ext3 journal for /var
[root@adrock init.d]# tune2fs -j /dev/ida/c0d0p7
tune2fs 1.27 (8-Mar-2002)
The filesystem already has a journal.
[root@adrock init.d]# debugfs -w /dev/ida/c0d0p7
debugfs 1.27 (8-Mar-2002)
/dev/ida/c0d0p7: Can't read an inode bitmap while reading inode bitmap
debugfs: quit
[root@adrock init.d]# dd if=/dev/ida/c0d0p7 of=/big/var.bak.dd
530368+0 records in

Still hosed, but now I have a backup of the burnination. And now for the FIX!!!

mke2fs -S /dev/ida/c0d0p7
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
66528 inodes, 265184 blocks
13259 blocks (5.00%) reserved for the super user
First data block=1
33 block groups
8192 blocks per group, 8192 fragments per group
2016 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185

Writing superblocks and filesystem accounting information: done

That did it! mke2fs re-wrote all of the superblocks and group descriptors and I was able to mount in RO mode and copy off the data. After that I was able to fsck and remount the original parition with no problems!

I found some great info on the RedHat ext3 mailing list archive which led me to this fix. Big thanks to the guys on that list!

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
8 [报告]
发表于 2005-07-18 15:23 |只看该作者

/var(ext3) was down! 如何修复?(或者ext3如此劣质)

mke2fs 难道到了这个地步?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP