LinuxSir.cn,穿越时空的Linuxsir!

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

用dadme建立的软raid5,怎么查看磁盘是不是损坏?

[复制链接]
发表于 2009-3-20 08:48:32 | 显示全部楼层 |阅读模式
我检查启动日志:
root@debian:/var/log# gedit kern.log
发现下面的内容:
raid5: raid level 5 set md0 active with 3 out of 4 devices, algorithm 2
Mar 19 08:16:45 debian kernel: [   10.829246] RAID5 conf printout:
Mar 19 08:16:45 debian kernel: [   10.829246]  --- rd:4 wd:3
Mar 19 08:16:45 debian kernel: [   10.829246]  disk 0, o:1, dev:sdb6
Mar 19 08:16:45 debian kernel: [   10.829246]  disk 1, o:1, dev:sda6
Mar 19 08:16:45 debian kernel: [   10.829246]  disk 2, o:1, dev:sdd6
然后查看/proc/mdstat:
@debian:~$ cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdb6[0] sdd6[2] sda6[1]
      691260480 blocks level 5, 64k chunk, algorithm 2 [4/3] [UUU_]
      
unused devices: <none>

是不是有个磁盘损坏了?
 楼主| 发表于 2009-3-20 08:53:06 | 显示全部楼层
root@debian:/# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c3345

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1216     9767488+  83  Linux
/dev/sda2            1217       30401   234428512+   5  Extended
/dev/sda5            1217        1715     4008186   83  Linux
/dev/sda6            1716       30401   230420263+  83  Linux

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0001c5f2

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1216     9767488+  83  Linux
/dev/sdb2            1217       30401   234428512+   5  Extended
/dev/sdb5            1217        1715     4008186   83  Linux
/dev/sdb6            1716       30401   230420263+  83  Linux

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c3345

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        1216     9767488+  83  Linux
/dev/sdc2            1217       30401   234428512+   5  Extended
/dev/sdc5            1217        1715     4008186   83  Linux
/dev/sdc6            1716       30401   230420263+  83  Linux

Disk /dev/sdd: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0002cbe9

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1        1216     9767488+  83  Linux
/dev/sdd2            1217       30401   234428512+   5  Extended
/dev/sdd5            1217        1715     4008186   83  Linux
/dev/sdd6            1716       30401   230420263+  83  Linux

Disk /dev/md0: 707.8 GB, 707850731520 bytes
2 heads, 4 sectors/track, 172815120 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-20 09:01:56 | 显示全部楼层
root@debian:/etc/mdadm# cat mdadm.conf
DEVICE /dev/sda6 /dev/sdb6 /dev/sdc6 /dev/sdd6
ARRAY /dev/md0 level=raid5 num-devices=4 metadata=00.90 spares=1 UUID=fd6750cc:95470c73:9d4deba6:47ca997f
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-20 09:05:47 | 显示全部楼层
root@debian:/# mdadm -D /dev/md0
mdadm: metadata format 00.90 unknown, ignored.
/dev/md0:
        Version : 00.90
  Creation Time : Mon Mar  9 09:04:57 2009
     Raid Level : raid5
     Array Size : 691260480 (659.24 GiB 707.85 GB)
  Used Dev Size : 230420160 (219.75 GiB 235.95 GB)
   Raid Devices : 4
  Total Devices : 3
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Fri Mar 20 08:52:06 2009
          State : clean, degraded
Active Devices : 3
Working Devices : 3
Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : fd6750cc:95470c73:c230666b:5103eba0
         Events : 0.79122

    Number   Major   Minor   RaidDevice State
       0       8       22        0      active sync   /dev/sdb6
       1       8        6        1      active sync   /dev/sda6
       2       8       54        2      active sync   /dev/sdd6
       3       0        0        3      removed
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-20 09:10:50 | 显示全部楼层
root@debian:/# mdadm -E /dev/sdc6
mdadm: metadata format 00.90 unknown, ignored.
/dev/sdc6:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : fd6750cc:95470c73:c230666b:5103eba0
  Creation Time : Mon Mar  9 09:04:57 2009
     Raid Level : raid5
  Used Dev Size : 230420160 (219.75 GiB 235.95 GB)
     Array Size : 691260480 (659.24 GiB 707.85 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0

    Update Time : Thu Mar 12 09:20:40 2009
          State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
  Spare Devices : 0
       Checksum : f037c122 - correct
         Events : 512

         Layout : left-symmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     3       8       54        3      active sync   /dev/sdd6

   0     0       8        6        0      active sync   /dev/sda6
   1     1       8       22        1      active sync   /dev/sdb6
   2     2       8       38        2      active sync   /dev/sdc6
   3     3       8       54        3      active sync   /dev/sdd6
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-20 11:06:25 | 显示全部楼层
用maddm -a重组成功了
但这是什么原因?建好的raid怎么会莫名其妙有块磁盘丢失?
回复 支持 反对

使用道具 举报

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

本版积分规则

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