我有一个服务器与RAID中的2个磁盘,其中一个失败。 称为提供商,让他们改变磁盘。
重新启动后,我仍然只能看到一个磁盘:
cat /proc/mdstat Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] md2 : active raid1 sda3[0] 1073610560 blocks super 1.2 [2/1] [U_] md3 : active raid1 sda4[0] 1839089920 blocks super 1.2 [2/1] [U_] md0 : active raid1 sda1[0] 16768896 blocks super 1.2 [2/1] [U_] md1 : active raid1 sda2[0] 523968 blocks super 1.2 [2/1] [U_] unused devices: <none>
它看起来像新的驱动器被删除:
mdadm -D /dev/md3 /dev/md3: Version : 1.2 Creation Time : Wed Jun 17 00:26:21 2015 Raid Level : raid1 Array Size : 1839089920 (1753.89 GiB 1883.23 GB) Used Dev Size : 1839089920 (1753.89 GiB 1883.23 GB) Raid Devices : 2 Total Devices : 1 Persistence : Superblock is persistent Update Time : Sun Nov 5 15:56:00 2017 State : clean, degraded Active Devices : 1 Working Devices : 1 Failed Devices : 0 Spare Devices : 0 Name : rescue:3 UUID : 0c807ba7:4535e375:273f715a:7ab59c54 Events : 2851 Number Major Minor RaidDevice State 0 8 4 0 active sync /dev/sda4 2 0 0 2 removed
所以问题是如何启用我的新磁盘在/ dev / sdb? 当我用这个工具testing它时,它看起来不错:
smartctl -H /dev/sdb smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-98-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED
我如何继续?
首先备份重要的数据,最好的完整分区与dd(当没有程序写在那里)。 你可以使用这样的东西:
dd if=/dev/md3 of=/your/backup/path/md3.dump bs=1M
所以如果出了什么问题你就安全了
https://www.howtoforge.com/replacing_hard_disks_in_a_raid1_array