在debian 7.5上降级RAID1

我在根服务器和RAID降级方面存在一些问题。 不幸的是,在RAID方面我不是专家。

系统信息:Debian 7.5,SSD软件RAID1,几天后发生问题。

请参阅我可以从命令行获得的以下信息:

================================================== =====================

# cat /proc/mdstat Personalities : [raid1] md2 : active raid1 sda3[0] 216994240 blocks super 1.2 [2/1] [U_] md1 : active raid1 sda2[0] 523968 blocks super 1.2 [2/1] [U_] md0 : active (auto-read-only) raid1 sda1[0] 16768896 blocks super 1.2 [2/1] [U_] unused devices: <none> # mdadm -D /dev/md0 /dev/md0: Version : 1.2 Creation Time : Tue Jan 7 09:39:23 2014 Raid Level : raid1 Array Size : 16768896 (15.99 GiB 17.17 GB) Used Dev Size : 16768896 (15.99 GiB 17.17 GB) Raid Devices : 2 Total Devices : 1 Persistence : Superblock is persistent Update Time : Tue Jan 7 10:00:27 2014 State : clean, degraded Active Devices : 1 Working Devices : 1 Failed Devices : 0 Spare Devices : 0 Name : rescue:0 UUID : 7bda6bfa:f532c676:88921937:c40e5b60 Events : 19 Number Major Minor RaidDevice State 0 8 1 0 active sync /dev/sda1 1 0 0 1 removed # mdadm -D /dev/md1 /dev/md1: Version : 1.2 Creation Time : Tue Jan 7 09:39:23 2014 Raid Level : raid1 Array Size : 523968 (511.77 MiB 536.54 MB) Used Dev Size : 523968 (511.77 MiB 536.54 MB) Raid Devices : 2 Total Devices : 1 Persistence : Superblock is persistent Update Time : Mon Jun 9 18:02:08 2014 State : clean, degraded Active Devices : 1 Working Devices : 1 Failed Devices : 0 Spare Devices : 0 Name : rescue:1 UUID : a34a400c:6e44aebb:e6bd697f:832bebe3 Events : 106 Number Major Minor RaidDevice State 0 8 2 0 active sync /dev/sda2 1 0 0 1 removed # mdadm -D /dev/md2 /dev/md2: Version : 1.2 Creation Time : Tue Jan 7 09:39:23 2014 Raid Level : raid1 Array Size : 216994240 (206.94 GiB 222.20 GB) Used Dev Size : 216994240 (206.94 GiB 222.20 GB) Raid Devices : 2 Total Devices : 1 Persistence : Superblock is persistent Update Time : Tue Jun 10 11:01:58 2014 State : clean, degraded Active Devices : 1 Working Devices : 1 Failed Devices : 0 Spare Devices : 0 Name : rescue:2 UUID : fda00d92:d41a6e34:9fcc87f9:29ef44be Events : 255477 Number Major Minor RaidDevice State 0 8 3 0 active sync /dev/sda3 1 0 0 1 removed 

================================================== =====================

以我的观点来看,RAID损失了一些驱动器? (或所有的!!!)我怎样才能让这个RAID工作再次正确? 我有一个到服务器的SSH根连接。

提前致谢。 chriskapeller

你确实是对的。 服务器丢失了一个,如果它是驱动器(可能是/ dev / sdb)。 你总共有3个RAID设备/ dev / md0,/ dev / md1,/ dev / md2(我想这些是/,/ boot和swap)

您需要执行以下操作:

  • validation磁盘确实失败了, dmesg可以帮助(并且让你感到困惑)。
  • 要求提供者物理更改发生故障的驱动器
  • 之后,重新组装raid

raid重组的过程如下(假定磁盘是/ dev / sda和/ dev / sdb:

  • 从现有磁盘dd if=/dev/sda of=/dev/sdb bs=1M count=1复制磁盘分区dd if=/dev/sda of=/dev/sdb bs=1M count=1
  • 修复分区cfdisk /dev/sdb基本上写分区
  • 添加相应的碎片到破碎的数组:

    • mdadm /dev/md0 -add /dev/sda1
    • mdadm /dev/md1 -add /dev/sda2
    • mdadm /dev/md2 -add /dev/sda3
  • 强制文件系统检查fsck

您可以在以下位置find更多信息:

https://raid.wiki.kernel.org/index.php/Recovering_a_failed_software_RAID

https://raid.wiki.kernel.org/index.php/RAID_Recovery