lvm 上的 reiserfsck

lvm 上的 reiserfsck

似乎我的文件系统在上次重启服​​务器时不知何故被损坏了。我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底层?我的做法是正确的吗? [/更新] 检查/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,有时块号会发生变化。似乎有些东西真的坏了。我有没有可能以某种方式让分区重新工作?这是一台我无法直接物理访问的服务器(托管服务器)。

提前致谢!

答案1

好吧,再过几个小时,reiserfsck似乎要重复这个三步过程

reiserfsck --check ...
reiserfsck --rebuild-sb ...
reiserfsck --rebuild-tree ...

最终解决了问题。我仍然不知道问题的原因,因为任何驱动器上似乎都没有坏块,我也不知道丢失了多少数据,但毕竟我很确定这不应该发生。一个分区仍在“重播其日志”,但只要我可以重新启动计算机,我就会告诉您成功(或失败)。

相关内容