Пришло сообщение, что отказал RAID: This is an automatically generated mail message from mdadm running on
A DegradedArray event had been detected on md device /dev/md0.
Faithfully yours, etc.
P.S. The /proc/mdstat file currently contains the following:
Personalities : [raid1]
md0 : active raid1 sda2[1]
388604224 blocks [2/1] [_U]
unused devices: <none>
Смотрим, что случилось:
#cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb2[1]
388604224 blocks [2/1] [_U]
#mdadm --detail /dev/md0
/dev/md0:
Version : 00.90
Creation Time : Thu Feb 19 14:59:47 2009
Raid Level : raid1
Array Size : 388604224 (370.60 GiB 397.93 GB)
Used Dev Size : 388604224 (370.60 GiB 397.93 GB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Thu Mar 12 11:23:38 2009
State : active, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
UUID : 60b0013f:7372c5d4:262fce52:c3c9a424
Events : 0.321
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 18 1 active sync /dev/sdb2
Вынимаем битый диск и подсовываем такой же по размеру, проверяем:
# fdisk -l
Disk /dev/sda: 400.0 GB, 400088457216 bytes
Disk /dev/sda doesn't contain a valid partition table
Disk /dev/sdb: 400.0 GB, 400088457216 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sdb2 * 263 48641 388604317+ fd Linux raid autodetect
Создаем разделы, как на живом диске:
# sfdisk -d /dev/sdb | sfdisk /dev/sda
Проверяем разбивку:
# fdisk -l
Disk /dev/sda: 400.0 GB, 400088457216 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 263 48641 388604317+ fd Linux raid autodetect
Disk /dev/sdb: 400.0 GB, 400088457216 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sdb2 * 263 48641 388604317+ fd Linux raid autodetect
Теперь можно подключить новый диск в raid:
# mdadm --add /dev/md0 /dev/sda2
mdadm: added /dev/sda2
Проверяем как идет процесс ребилдинга:
# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda2[2] sdb2[1]
388604224 blocks [2/1] [_U]
[>....................] recovery = 0.5% (1944960/388604224) finish=102.7min speed=62740K/sec
unused devices: <none>
И все готово.
URL:
Обсуждается: https://www.opennet.ru/tips/info/1984.shtml