NAS raid 5使用mdadm恢复:卷和挂载问题,请帮助

你好,这是我第一次涉足ubuntu,或任何forms的Linix,以及我第一次尝试恢复失败的raid,但我是一个相当快速的研究。 我有一个8TB的WD份额空间,在Raid 5上设置了四个2TB驱动器,带有两个“失败”(可能不是)驱动器。 我迫切希望恢复我的数据。 除了所有的音乐,电影和游戏等,我的孩子们成长的所有照片和家庭video都在这件事上,我非常渴望恢复它们。 除了喜欢自己做事,我还买不起专业的数据恢复。 我没有备份驱动器来复制我的原件,我买不起,所以我不得不尝试用原始磁盘自己做。 任何帮助表示赞赏。

原谅我,如果我解释,因为我不确定什么是相关的,什么不是,因为我想弄明白这一点。 我相信我的NAS中的控制器发生故障,驱动器上的数据实际上仍然完好无损。 我已将所有四个驱动器从NAS中取出并按顺序将它们按顺序放入我的普通硬盘驱动器中,并在尝试模式下使用Live CD运行Ubuntu。 到目前为止,我一直在努力使用本指南: HOWTO:Sharespace Raid 5数据恢复 ,但我遇到了一些障碍,整个论坛都关闭了,所以我不能在那里提问。

我做的第一件事就是将自己设置为root用户并检查以确保我的所有驱动器都在正确的位置并被识别。 使用fdisk -l

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 1 417689 208844+ fd Linux raid autodetect /dev/sda2 417690 2506139 1044225 fd Linux raid autodetect /dev/sda3 2506140 2923829 208845 fd Linux raid autodetect /dev/sda4 2923830 3907024064 1952050117+ fd Linux raid autodetect Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 417689 208844+ fd Linux raid autodetect /dev/sdb2 417690 2506139 1044225 fd Linux raid autodetect /dev/sdb3 2506140 2923829 208845 fd Linux raid autodetect /dev/sdb4 2923830 3907024064 1952050117+ fd Linux raid autodetect Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x00000000 Device Boot Start End Blocks Id System /dev/sdc1 1 417689 208844+ fd Linux raid autodetect /dev/sdc2 417690 2506139 1044225 fd Linux raid autodetect /dev/sdc3 2506140 2923829 208845 fd Linux raid autodetect /dev/sdc4 2923830 3907024064 1952050117+ fd Linux raid autodetect Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x00000000 Device Boot Start End Blocks Id System /dev/sdd1 1 417689 208844+ fd Linux raid autodetect /dev/sdd2 417690 2506139 1044225 fd Linux raid autodetect /dev/sdd3 2506140 2923829 208845 fd Linux raid autodetect /dev/sdd4 2923830 3907024064 1952050117+ fd Linux raid autodetect 

不是真的知道我在寻找什么,但没有看到任何发送任何红旗的东西,它们看起来都非常完整和健康,所以我继续尝试从sd * 4分区组装raid应该是是那些有重建raid数据的人。

我试过了:

 mdadm --assemble /dev/md0 /dev/sda4 /dev/sdb4 /dev/sdc4 /dev/sdd4 

但是我得到了关于2个驱动器的错误并且还不够,所以开始搜索互联网并了解到有一个强制命令,所以我使用它:

 mdadm --assemble --force /dev/md0 /dev/sda4 /dev/sdb4 /dev/sdc4 /dev/sdd4 

这似乎有效。 YAY!……有点……

 vgscan No volume groups found 

嘘……回到网上搜索我找到了一个post,其中有人有类似的问题,不得不重新创建他们的音量和本地组以成功访问他们的数据。 使用我使用的指南中的卷组和本地组的名称,我使用我找到的新命令创建它们:

 vgcreate vg0 /dev/md0 

 lvcreate -L5.45T -n lv0 vg0 

据报道,两者都创造了世界各地的一切。 直到,回到我的向导,我试图安装它:

 mkdir /mnt/raid mount -t auto /dev/vg0/lv0 /mnt/raid mount: you must specify the filesystem type 

显然“自动”不像导游说的那样有效。 我在网上找到了几个文件系统类型ext3和ext 4,所以我也尝试了它们:

 mount -t ext3 /dev/vg0/lv0 /mnt/raid mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg0-lv0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so 

 mount -t ext4 /dev/vg0/lv0 /mnt/raid mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg0-lv0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so 

你可以看到它们都没有用……所以经过几个小时的搜索后我得出的结论是,我真的需要寻求帮助。 如果有人有任何建议或建议,或者甚至更好地知道如何使这项工作,我真的很感激这种见解。 如果我做错了什么也很不错。

我认为这也可能有用:

 mdadm --detail /dev/md0 /dev/md0: Version : 0.90 Creation Time : Thu Dec 10 05:44:29 2009 Raid Level : raid5 Array Size : 5854981248 (5583.75 GiB 5995.50 GB) Used Dev Size : 1951660416 (1861.25 GiB 1998.50 GB) Raid Devices : 4 Total Devices : 3 Preferred Minor : 0 Persistence : Superblock is persistent Update Time : Thu Apr 4 08:12:03 2013 State : clean, degraded Active Devices : 3 Working Devices : 3 Failed Devices : 0 Spare Devices : 0 Layout : left-symmetric Chunk Size : 64K UUID : dd69553d:5c832cf7:9755c9c8:d208511e Events : 0.3986045 Number Major Minor RaidDevice State 0 8 4 0 active sync /dev/sda4 1 8 20 1 active sync /dev/sdb4 2 8 36 2 active sync /dev/sdc4 3 0 0 3 removed 

以及:

 cat /proc/mdstat Personalities : [raid6] [raid5] [raid4] md0 : active raid5 sda4[0] sdc4[2] sdb4[1] 5854981248 blocks level 5, 64k chunk, algorithm 2 [4/3] [UUU_] unused devices:  

这是我的fdisk -l现在看起来像玩了所有这些:

 fdisk -l Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 1 417689 208844+ fd Linux raid autodetect /dev/sda2 417690 2506139 1044225 fd Linux raid autodetect /dev/sda3 2506140 2923829 208845 fd Linux raid autodetect /dev/sda4 2923830 3907024064 1952050117+ fd Linux raid autodetect Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 417689 208844+ fd Linux raid autodetect /dev/sdb2 417690 2506139 1044225 fd Linux raid autodetect /dev/sdb3 2506140 2923829 208845 fd Linux raid autodetect /dev/sdb4 2923830 3907024064 1952050117+ fd Linux raid autodetect Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x00000000 Device Boot Start End Blocks Id System /dev/sdc1 1 417689 208844+ fd Linux raid autodetect /dev/sdc2 417690 2506139 1044225 fd Linux raid autodetect /dev/sdc3 2506140 2923829 208845 fd Linux raid autodetect /dev/sdc4 2923830 3907024064 1952050117+ fd Linux raid autodetect Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x00000000 Device Boot Start End Blocks Id System /dev/sdd1 1 417689 208844+ fd Linux raid autodetect /dev/sdd2 417690 2506139 1044225 fd Linux raid autodetect /dev/sdd3 2506140 2923829 208845 fd Linux raid autodetect /dev/sdd4 2923830 3907024064 1952050117+ fd Linux raid autodetect Disk /dev/md0: 5995.5 GB, 5995500797952 bytes 2 heads, 4 sectors/track, 1463745312 cylinders, total 11709962496 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 65536 bytes / 196608 bytes Disk identifier: 0x00000000 Disk /dev/md0 doesn't contain a valid partition table Disk /dev/mapper/vg0-lv0: 5992.3 GB, 5992339210240 bytes 255 heads, 63 sectors/track, 728527 cylinders, total 11703787520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 65536 bytes / 196608 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg0-lv0 doesn't contain a valid partition table 

请记住,我仍然是新手,所以如果有任何建议可以请你对你提出建议的原因有一些基本的了解,我将不胜感激。 它将帮助我更好地了解我正在做的事情。 谢谢!

根据您提供的信息,我认为您可能是正确的,因为绝大多数数据都保持不变。 此时您正在处理损坏的RAIDarrays。 显然不是你想成为的地方,也不是世界末日。

根据我使用ShareSpace设备的经验,通常在RAID实际崩溃之前很久就会有一个驱动器从arrays中退出。 Linux Software RAID系统检测到第一个驱动器故障,并将arrays切换到降级模式。 这意味着arrays继续运行,但它只使用剩下的三个好驱动器。 事情看起来会正常运行一段时间,直到第二个驱动器从arrays中掉出来。 然后RAID崩溃,你有一个问题。

这些驱动器退出是有原因的。 通常它是坏道。 幸运的是,经常可以恢复。 但是你需要谨慎行事,因为你采取的任何错过步骤都会减少数据恢复的可能性。

如果您想单独行动,我会建议您在继续进行之前拍摄备用图像。 我知道使用四个2TB驱动器说起来容易做起来难。 但是你真的只需要备份三个/ dev / sda,/ dev / sdb和/ dev / sdc。

或者,如果您需要帮助,我是一名在线数据恢复顾问。 我通过互联网为全球客户执行远程NAS / RAID数据恢复。 在过去,我已经执行了许多成功的远程WD ShareSpace数据恢复操作。 我提供远程数据恢复和自己动手的数据恢复帮助。 如果你愿意,我很乐意帮助你。 通过我的网站与我联系。 我的名字是Stephen Haran,我的网站是http://www.FreeDataRecovery.us

更新:感谢Stephen,我的所有数据都得以恢复。 如果有人需要任何类型的数据恢复帮助,我强烈推荐他的服务。 http://www.FreeDataRecovery.us