如何在驱动器更换后重build我的软件RAID1arrays?

所以我有1and1专用主机与RAID 1设置。 其中一个驱动器坏了,他们用一个好的replace了它。 现在我需要build设,但我不确定哪个驱动器是旧驱动器,哪个驱动器是新的驱动器。 请帮忙。 以下是说明: http : //help.1and1.com/servers-c37684/linux-server-c37687/system-recovery-c37690/how-do-i-rebuild-my-software-raid-array-after-a-推动替代,a730894.html

根据我的理解,我_think_我的旧驱动器是/ dev / sda,这意味着我应该继续步骤7:

sfdisk -d /dev/sda | sfdisk /dev/sdb 

我对么? 这是我的控制台的东西。 请帮忙,谢谢。

 [root@u16365582 ~]# fdisk -l Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 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: 0x00000000 Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 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: 0x416e0acb Device Boot Start End Blocks Id System /dev/sda1 1 523 4194304 fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sda2 523 784 2097152 82 Linux swap / Solaris Partition 2 does not end on cylinder boundary. /dev/sda3 784 121602 970470104 fd Linux raid autodetect Partition 3 does not end on cylinder boundary. Disk /dev/md3: 993.8 GB, 993761296384 bytes 2 heads, 4 sectors/track, 242617504 cylinders Units = cylinders of 8 * 512 = 4096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/md1: 4294 MB, 4294901760 bytes 2 heads, 4 sectors/track, 1048560 cylinders Units = cylinders of 8 * 512 = 4096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg00-usr: 34.4 GB, 34359738368 bytes 255 heads, 63 sectors/track, 4177 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: 0x00000000 Disk /dev/mapper/vg00-var: 871.9 GB, 871878361088 bytes 255 heads, 63 sectors/track, 105999 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: 0x00000000 Disk /dev/mapper/vg00-home: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 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: 0x00000000 [root@u16365582 ~]# cat /proc/mdstat Personalities : [raid1] md1 : active raid1 sda1[0] 4194240 blocks [2/1] [U_] bitmap: 1/1 pages [4KB], 65536KB chunk md3 : active raid1 sda3[1] 970470016 blocks [2/1] [_U] bitmap: 206/232 pages [824KB], 2048KB chunk unused devices: <none> [root@u16365582 ~]# 

/ dev / sda是​​由mdstat报告的“好”驱动器。 它也是由fdisk报告的有效的分区数据。

本指南提议使用sfdisk将分区信息复制到/ dev / sdb应该是安全的,如果您在需要保留其数据之前没有使用/ dev / sdb。 完成此操作后(可能还需要一个额外的partprobe调用)之后,您应该可以mdadm manage [...] --add [...]分区/dev/sdb1/dev/sdb3md1md3分别。