![删除 Raid5 并以不同顺序重新创建磁盘](https://linux22.com/image/606823/%E5%88%A0%E9%99%A4%20Raid5%20%E5%B9%B6%E4%BB%A5%E4%B8%8D%E5%90%8C%E9%A1%BA%E5%BA%8F%E9%87%8D%E6%96%B0%E5%88%9B%E5%BB%BA%E7%A3%81%E7%9B%98.png)
我有一个 4 raid 5 阵列,在运行 Zentyal(基于 Ubuntu 12.04)服务器软件包的 Linux 服务器上用作 /home。我无法在 Zentyal 软件包上识别 raid,因此在新服务器上安装 Zentyal 时,我删除了 md0 阵列并创建了一个新阵列。我没有检查磁盘的顺序是否与原始服务器相同。安装结束时重新启动时,阵列已重新同步。现在我有一个干净的安装,但没有可见的数据。我可以通过 mdadm 或 testdisk 取回数据吗?
感谢您的帮助
答案1
顺序可能不是这里的问题,mdadm 应该能够处理它。,但如果您的阵列正在重新同步,您可能丢失了数据。您应该尝试创建新阵列并强制不进行重新同步,假设您已经有一个干净的阵列:
man mdadm
[...]
--assume-clean
Tell mdadm that the array pre-existed and is known to be clean. It can be useful when trying to recover from a major failure as you can be sure that no data will be affected unless you actually write to the array. It can also be used when creating a RAID1 or RAID10 if you want to avoid the initial resync, however this practice — while normally safe — is not recommended. Use this only if you really know what you are doing.
[...]
现在重新同步已完成,您可以尝试查看它显示的测试磁盘,但遗憾的是,我对此没有太多期待。