访问损坏的 mdadm raid

访问损坏的 mdadm raid

我使用 Western Digital mybookworld(使用 Linux 的 SOHO NAS 存储)作为 Linux 机器的备份。突然,mybookworld 无法再启动。于是我打开机器,取出硬盘,将硬盘放入外部 USB HDD 盒中,然后将其连接到 Linux 机器。

[  530.640301] usb 2-1: new high speed USB device using ehci_hcd and address 3
[  530.797630] scsi7 : usb-storage 2-1:1.0
[  531.794844] scsi 7:0:0:0: Direct-Access     WDC WD75 00AAKS-00RBA0         PQ: 0 ANSI: 2
[  531.796490] sd 7:0:0:0: Attached scsi generic sg3 type 0
[  531.797966] sd 7:0:0:0: [sdc] 1465149168 512-byte logical blocks: (750 GB/698 GiB)
[  531.800317] sd 7:0:0:0: [sdc] Write Protect is off
[  531.800327] sd 7:0:0:0: [sdc] Mode Sense: 38 00 00 00
[  531.800333] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  531.803821] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  531.803836]  sdc: sdc1 sdc2 sdc3 sdc4
[  531.815831] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  531.815842] sd 7:0:0:0: [sdc] Attached SCSI disk

dmesg 输出看起来正常,但我想知道为什么硬盘根本没有挂载。为什么上面有 4 个不同的分区。fdisk 显示以下内容:

root@ubuntu:/home/ubuntu# fdisk /dev/sdc

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sdc: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00007c00

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               4         369     2939895   fd  Linux raid autodetect
/dev/sdc2             370         382      104422+  fd  Linux raid autodetect
/dev/sdc3             383         505      987997+  fd  Linux raid autodetect
/dev/sdc4             506       91201   728515620   fd  Linux raid autodetect

哦不!一切似乎都是作为 mdadm 软件 raid 创建的。使用不同的分区调用 mdadm --examine 似乎证实了这一点。

我认为我唯一感兴趣的分区是 /dev/sdc4(因为它是最大的)。但尽管如此,我对每个分区都调用了 mdadm --examine。

root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdc1 
/dev/sdc1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 5626a2d8:070ad992:ef1c8d24:cd8e13e4
  Creation Time : Wed Feb 20 00:57:49 2002
     Raid Level : raid1
  Used Dev Size : 2939776 (2.80 GiB 3.01 GB)
     Array Size : 2939776 (2.80 GiB 3.01 GB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 1

    Update Time : Sun Nov 21 11:05:27 2010
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0
       Checksum : 4c90bc55 - correct
         Events : 16682


      Number   Major   Minor   RaidDevice State
this     0       8        1        0      active sync   /dev/sda1

   0     0       8        1        0      active sync   /dev/sda1
   1     1       0        0        1      faulty removed

root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdc2
/dev/sdc2:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 9734b3ee:2d5af206:05fe3413:585f7f26
  Creation Time : Wed Feb 20 00:57:54 2002
     Raid Level : raid1
  Used Dev Size : 104320 (101.89 MiB 106.82 MB)
     Array Size : 104320 (101.89 MiB 106.82 MB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 2

    Update Time : Wed Oct 27 20:19:08 2010
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0
       Checksum : 55560b40 - correct
         Events : 9884


      Number   Major   Minor   RaidDevice State
this     0       8        2        0      active sync   /dev/sda2

   0     0       8        2        0      active sync   /dev/sda2
   1     1       0        0        1      faulty removed

root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdc3
/dev/sdc3:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 08f30b4f:91cca15d:2332bfef:48e67824
  Creation Time : Wed Feb 20 00:57:54 2002
     Raid Level : raid1
  Used Dev Size : 987904 (964.91 MiB 1011.61 MB)
     Array Size : 987904 (964.91 MiB 1011.61 MB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 3

    Update Time : Sun Nov 21 11:05:27 2010
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0
       Checksum : 39717874 - correct
         Events : 73678


      Number   Major   Minor   RaidDevice State
this     0       8        3        0      active sync

   0     0       8        3        0      active sync
   1     1       0        0        1      faulty removed

root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdc4
/dev/sdc4:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : febb75ca:e9d1ce18:f14cc006:f759419a
  Creation Time : Wed Feb 20 00:57:55 2002
     Raid Level : raid1
  Used Dev Size : 728515520 (694.77 GiB 746.00 GB)
     Array Size : 728515520 (694.77 GiB 746.00 GB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 4

    Update Time : Sun Nov 21 11:05:27 2010
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0
       Checksum : 2f36a392 - correct
         Events : 519320


      Number   Major   Minor   RaidDevice State
this     0       8        4        0      active sync

   0     0       8        4        0      active sync
   1     1       0        0        1      faulty removed

如果我正确读取了输出,则所有内容都被删除了,因为它有故障。有什么方法可以查看最大分区的内容吗?或者以某种方式查看哪些文件已损坏?我看到所有内容都是 raid1,它只是镜像,所以这应该是一个正常分区。我急于使用 mdadm 做任何事情,担心会破坏硬盘上的数据。我将非常感谢任何帮助。

答案1

已经尝试将它们作为单个磁盘安装?也许您必须猜测使用的是哪种文件系统。尝试 reiserfs、ext3、ext4。

相关内容