松窗竹户

2009年05月26日

软raid1的sda挂掉,让sdb启动

类归于: 服务器专栏 — 标签:, — bugx @ 10:48

希捷的1T,1.5T的硬盘真的很是垃圾,2009年前生产的,都是4张碟以上,好好多读写头,问了在希捷公司的同学,他说他们这部分硬盘基本出问题都是磁头问题,而不是硬盘本身出现坏道。我上次买了2块1.5T的,实在够烂,raid没做起来,同步到中间就掉盘,后来换了2块1T的,raid是做上了,但是用了一个月,sdb掉了,还让centOS也挂了,只好跑到机房,换了一个西部数据的盘。昨天登上服务器一查看,另一块希捷的盘又掉了。系统里都找不到sda了。。。怒了,这次希捷是主盘了。

软radi下做raid1,据上汤说软raid不是直接接管0磁道,也就是sda和sdb的引导区只存在第一个个磁盘中。那么碰到软raid第一个盘sda挂了,就要把引导区cp到sdb了,具体方法如下,用grub命令来实现

Probing devices to guess BIOS drives. This may take a long time.

GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported.  For the first word, TAB
lists possible command completions.  Anywhere else TAB lists the possible
completions of a device/filename.]

grub> device (hd1) /dev/sdb

grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd1)
Checking if “/boot/grub/stage1″ exists… no
Checking if “/grub/stage1″ exists… yes
Checking if “/grub/stage2″ exists… yes
Checking if “/grub/e2fs_stage1_5″ exists… yes
Running “embed /grub/e2fs_stage1_5 (hd1)”…  15 sectors are embedded.
succeeded
Running “install /grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/grub/stage2 /grub/grub.conf”… succeeded
Done.

如果是sdb挂了,那没什么问题。

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google

评论暂缺

还没有任何评论。

这篇文章上的评论 RSS feed

抱歉,评论暂时关闭。

WordPress 所驱动