LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 994|回复: 6

[求助]reiserfs分区坏了

[复制链接]
发表于 2006-6-29 11:23:16 | 显示全部楼层 |阅读模式
开机启动的过程就报错了,叫我Ctrl+D继续,因为那是个不关系统的分区,所以我可以进入系统。
进入系统后检查分区(hdd7):
  1. # reiserfsck /dev/hdd7
  2. reiserfsck 3.6.19 (2003 www.namesys.com)

  3. *************************************************************
  4. ** If you are using the latest reiserfsprogs and  it fails **
  5. ** please  email bug reports to reiserfs-list@namesys.com, **
  6. ** providing  as  much  information  as  possible --  your **
  7. ** hardware,  kernel,  patches,  settings,  all reiserfsck **
  8. ** messages  (including version),  the reiserfsck logfile, **
  9. ** check  the  syslog file  for  any  related information. **
  10. ** If you would like advice on using this program, support **
  11. ** is available  for $25 at  www.namesys.com/support.html. **
  12. *************************************************************

  13. Will read-only check consistency of the filesystem on /dev/hdd7
  14. Will put log info to 'stdout'

  15. Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
  16. ###########
  17. reiserfsck --check started at Thu Jun 29 19:03:55 2006
  18. ###########
  19. Replaying journal..
  20. Reiserfs journal '/dev/hdd7' in blocks [18..8211]: 0 transactions replayed

  21. The problem has occurred looks like a hardware problem. If you have
  22. bad blocks, we advise you to get a new hard drive, because once you
  23. get one bad block  that the disk  drive internals  cannot hide from
  24. your sight,the chances of getting more are generally said to become
  25. much higher  (precise statistics are unknown to us), and  this disk
  26. drive is probably not expensive enough  for you to you to risk your
  27. time and  data on it.  If you don't want to follow that follow that
  28. advice then  if you have just a few bad blocks,  try writing to the
  29. bad blocks  and see if the drive remaps  the bad blocks (that means
  30. it takes a block  it has  in reserve  and allocates  it for use for
  31. of that block number).  If it cannot remap the block,  use badblock
  32. option (-B) with  reiserfs utils to handle this block correctly.

  33. bread: Cannot read the block (196608): (Input/output error).

  34. Aborted
复制代码

报错的信息跟开机时的差不多。
然后我查google用了以下2个命令:
  1. # badblocks /dev/hdd7 -o badblocks.log
  2. #
  3. # reiserfsck --fix-fixable -B badblocks.log /dev/hdd7
  4. reiserfsck 3.6.19 (2003 www.namesys.com)

  5. *************************************************************
  6. ** If you are using the latest reiserfsprogs and  it fails **
  7. ** please  email bug reports to reiserfs-list@namesys.com, **
  8. ** providing  as  much  information  as  possible --  your **
  9. ** hardware,  kernel,  patches,  settings,  all reiserfsck **
  10. ** messages  (including version),  the reiserfsck logfile, **
  11. ** check  the  syslog file  for  any  related information. **
  12. ** If you would like advice on using this program, support **
  13. ** is available  for $25 at  www.namesys.com/support.html. **
  14. *************************************************************

  15. Will check consistency of the filesystem on /dev/hdd7
  16. and will fix what can be fixed without --rebuild-tree
  17. Bad block list will contain only blocks specified in 'badblocks.log' file
  18. Will put log info to 'stdout'

  19. Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
  20. create_badblock_bitmap: block number (786432) belongs to system reiserfs area. It cannot be relocated.
复制代码

还是没能修复。。
就是这句话:
create_badblock_bitmap: block number (786432) belongs to system reiserfs area. It cannot be relocated.
这是什么意思?我该怎么办?help..
发表于 2006-6-29 12:25:05 | 显示全部楼层
我也遇到过类似的问题,不过不是在gentoo里,而是dapper。

我现在是双系统,主系统是gentoo 2006.0,备份应急用系统是ubuntu dapper,这几天我启动dapper的时候遇到过和你类似的问题,不过启动gentoo时完全正常。我也不知道是什么原因,我按照提示输入密码,运行fsck.reiserfs检查磁盘,之后又让我加上--rebuild-tree参数再次运行fsck.reiserfs,运行结束后启动dapper就正常了。

希望对你能够有所帮助。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-29 14:14:55 | 显示全部楼层
谢谢楼上的回答
我运行
# fsck.reiserfs /dev/hdd7

# fsck.reiserfs --rebuild-tree /dev/hdd7
的结果一模一样
我试了在启动提示错误的时候输入root密码,然后运行上述命令,结果也一样
我还试了livecd启动运行fsck.reiserfs,也是同样的结果,郁闷。。
难道说硬盘确实坏了,只能格式化?
有一点坏道也应该可以fix的吧?
还有即使坏了还不知道格式化能不能通过?因为里面有一些数据,目前还希望有修复的办法
回复 支持 反对

使用道具 举报

发表于 2006-6-29 15:37:14 | 显示全部楼层
-_________-!!

你把坏道列表保存成文件了
但你不重新格式化并把坏道列表告诉系统,它怎么修?


昨天刚译的,不知道准不准,老兄当回白老鼠吧


我的硬盘有坏道怎么办?
我怎么知道自己硬盘上坏道的位置并保存成一个文件?
想把坏道的位置保存成一个文件你可以运行:
/sbin/badblocks [-b <reiserfs-block-size>] device
device是你linux下硬盘的分区,如/dev/hda6
如果你想用reiserfs格式工具集处理硬盘上的坏道的话,不要忘记加上 reiserfs-block-size 参数给badblocks命令。默认的reiserfs文件块(分配给文件的最小空间)是4K,你可以用debugreiserfs device命令查看一下你分区的参数。device参数意义同上。

我的硬盘有坏道该怎么办?
你可以试着用dd或dd_rescue程序修复硬盘(把坏的屏蔽,用好的后备空间补上的)(现在的硬盘对坏道的处理是能写不能读)明白这点--硬盘开始出问题(坏道)是非常正常的事而且会迅速的继续坏下去,如果想保存自己的资料请马上买硬盘。

我的reiserfs分区有坏道应该怎么办?
reiserfs可以处理位于数据区的坏道但对于系统区的坏道:超级块,日志,文件分配表则无能为力。
如果硬盘没有重新分配分区资源(重新分配分区里的空间),你不能把它用于reiserfs,用dd_rescue做个备份,运行reiserfsck在此分区上进行一次检查看一下情况。

我如何在一个有坏道的分区创立一个reiserfs
如果你有坏道列表文件(看上文关于/sbin/badblocks [-b <reiserfs-block-size>] device命令的解释,这个命令会制作出一个坏道列表文件的)
然后运行此命令:mkreiserfs --badblocks 坏道列表文件 分区
记得分区的块默认是4K,specify the same block size to badblocks program.

我如何检查reiserfs上有无坏道?
要检查一个文件系统,需要加些参数给reiserfsck
要修复坏道(把坏道加入坏道列表文件)用命令:
reiserfsck --badblocks 坏道列表文件 分区
列表文件列出了此分区所有的坏道
想在有坏道的分区上重建一个reiserfs,要用以下命令:
reiserfsck --rebuild-tree --bad-badblocks 坏道列表文件 分区

在reiserfs上我如果调整坏道列表
如果想调整的话要用命令:
reiserfstune --badblocks 坏道文件列表 分区

reiserfstune --add-badblocks 坏道文件列表 分区
列表文件里的文件块都会被当成坏块而不被读取。--badblocks选项清除原来的坏道列表,--add-badblocks选项则是把坏道重新添加入坏道列表文件并写入分区。如果分区内有一些坏道而reiserfstune命令运行不了,用reiserfsck代替(看上文)

我如何得到一个坏道列表并将它保存在reiserfs分区上?
用debugreiserfs -B 要保存的文件名 分区
如果分区的目录树被坏道破坏,那得到的列表将是无效的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-29 17:25:36 | 显示全部楼层
我用了两个命令:
先是:
# badblocks -b 4096 /dev/hdd7 -o badblocks.log
然后:
# reiserfsck --rebuild-tree --badblocks badblocks.log /dev/hdd7
得到的结果跟第一帖中
# reiserfsck --fix-fixable -B badblocks.log /dev/hdd7
的输出一模一样
Post by 妖狐藏马
你把坏道列表保存成文件了
但你不重新格式化并把坏道列表告诉系统,它怎么修?

你的意思是说一定要先格式化了?好吧……
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-29 17:36:08 | 显示全部楼层
晕,好干脆,
# makereiserfs /dev/hdd7
#
# reiserfsck /dev/hdd7
#
# mount /dev/hdd7 /mnt/hdd7
每一步都很正常,好像没什么坏道的样子
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-29 17:59:46 | 显示全部楼层
但是我用:
# badblocks -b 4096 /dev/hdd7 -o badblocks.log
badblocks.log中确实有一行数据:
# cat badblocks.log
196608
而用:
# badblocks /dev/hdd7 -o badblocks.log
badblocks.log中有4行数据:
# cat badblocks.log
786432
786433
786434
786435
怪哉
以上都是在没格式化之前,格式化之后就都没有了……
下班回家-_-
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表