似乎我的文件系统在上次重新启动服务器时以某种方式损坏了。我不能再fsck
有一些逻辑卷了。设置:
root@rescue ~ # cat /mnt/rescue/etc/fstab
proc /proc proc defaults 0 0
/dev/md0 /boot ext3 defaults 0 2
/dev/md1 / ext3 defaults,errors=remount-ro 0 1
/dev/systemlvm/home /home reiserfs defaults 0 0
/dev/systemlvm/usr /usr reiserfs defaults 0 0
/dev/systemlvm/var /var reiserfs defaults 0 0
/dev/systemlvm/tmp /tmp reiserfs noexec,nosuid 0 2
/dev/sda5 none swap defaults,pri=1 0 0
/dev/sdb5 none swap defaults,pri=1 0 0
[更新]
第一个问题:我应该检查哪些“部分”是否有坏块?逻辑卷,底层/dev/md
还是/dev/sdx
下面?做我正在做的事情是正确的吗?
[/UPDATE]
检查 /dev/systemlvm/usr 时的错误信息:
root@rescue ~ # reiserfsck /dev/systemlvm/usr
reiserfsck 3.6.19 (2003 www.namesys.com)
[...]
Will read-only check consistency of the filesystem on /dev/systemlvm/usr
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
###########
reiserfsck --check started at Wed Feb 3 07:10:55 2010
###########
Replaying journal..
Reiserfs journal '/dev/systemlvm/usr' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..
Bad root block 0. (--rebuild-tree did not complete)
Aborted
到目前为止,让我们尝试一下--rebuild-tree
:
root@rescue ~ # reiserfsck --rebuild-tree /dev/systemlvm/usr
reiserfsck 3.6.19 (2003 www.namesys.com)
[...]
Will rebuild the filesystem (/dev/systemlvm/usr) tree
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
Replaying journal..
Reiserfs journal '/dev/systemlvm/usr' in blocks [18..8211]: 0 transactions replayed
###########
reiserfsck --rebuild-tree started at Wed Feb 3 07:12:27 2010
###########
Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 269716 blocks marked used
Skipping 8250 blocks (super block, journal, bitmaps) 261466 blocks will be read
0%....20%....40%....60%....80%....100% left 0, 11368 /sec
52919 directory entries were hashed with "r5" hash.
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 261466
Leaves among those 13086
Objectids found 53697
Pass 1 (will try to insert 13086 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0% left 12675, 0 /sec
The problem has occurred looks like a hardware problem (perhaps
memory). Send us the bug report only if the second run dies at
the same place with the same block number.
mark_block_used: (39508) used already
Aborted
坏的。但是,让我们再做一次,如前所述:
[...]
Flushing..finished
Read blocks (but not data blocks) 261466
Leaves among those 13085
Objectids found 54305
Pass 1 (will try to insert 13085 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%... left 12127, 958 /sec
The problem has occurred looks like a hardware problem (perhaps
memory). Send us the bug report only if the second run dies at
the same place with the same block number.
build_the_tree: Nothing but leaves are expected. Block 196736 - internal
Aborted
每次都会发生同样的情况,只有实际的错误消息会发生变化。有时我得到mark_block_used: (somenumber) used already
,其他时候块号改变。好像有些东西真的坏了。我有没有机会让分区再次工作?这是我无法直接物理访问的服务器(托管服务器)。
提前致谢!
好吧,经过几个小时的
reiserfsck
学习,似乎重复了这个三步过程最终解决了问题。我仍然不知道问题的原因,因为任何驱动器上似乎都没有坏块,我也不知道丢失了多少数据,但毕竟我很确定这不应该发生。一个分区仍在“重播它的日志”,但我会在重启计算机后立即告知成功(或失败)。