mdadm 错误识别阵列,如何恢复数据

mdadm 错误识别阵列,如何恢复数据

因此,我将两个磁盘 sd[cd] 格式化,每个磁盘都作为一个大的 ext4 分区,然后使用 mdadm 创建 raid0 阵列 sd[cd]1。这很顺利,我挂载了设备并开始在上面存储数据。在此之前,我尝试使用 sd[cd],而不先将它们分区到 raid 阵列中,但我无法让它工作,并删除了阵列 - 或者我是这么认为的。)

当我重新启动 raid 阵列时,检查磁盘失败并且无法挂载(但磁盘(ssds)是全新的,我在其上运行了坏块,没有发现物理错误。)

阵列似乎也配置错误,好像它想使用 sd[cd] 设备本身,而不是我为其设置的 sd[cd]1 分区。当我检查 mdstat 时,我不知道 md127 是什么,也许它是之前工作的“真实” raid 配置?

我想恢复磁盘上的数据,我确信它们都还在那里。我想再次对它们进行 raid0,但不想再遇到这个问题。

猫/proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md127 : inactive md0[0](S)
      117218776 blocks super 1.2

md0 : active raid0 sdc[0] sdd[1]
      234438656 blocks super 1.2 512k chunks

unused devices: <none>

消息

[   18.347571] md: bind<sdd>
[   18.349296] md: bind<sdc>
[   18.350345] bio: create slab <bio-1> at 1
[   18.350350] md/raid0:md0: md_size is 468877312 sectors.
[   18.350351] md: RAID0 configuration for md0 - 1 zone
[   18.350352] md: zone0=[sdc/sdd]
[   18.350354]       zone-offset=         0KB, device-offset=         0KB, size= 234438656KB
[   18.350354] 
[   18.350359] md0: detected capacity change from 0 to 240065183744
[   18.351480]  md0: unknown partition table
[   18.358626] md: bind<md0>

fdisk -l

Disk /dev/sdc: 120.0 GB, 120034123776 bytes
30 heads, 16 sectors/track, 488420 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa57656d5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048   234441647   117219800   83  Linux

Disk /dev/sdd: 120.0 GB, 120034123776 bytes
30 heads, 16 sectors/track, 488420 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe34daa29

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048   234441647   117219800   83  Linux

Disk /dev/md0: 240.1 GB, 240065183744 bytes
2 heads, 4 sectors/track, 58609664 cylinders, total 468877312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

相关内容