Eu tenho uma invasão de software linux de unidade 2 para um servidor. Existem dois dispositivos de ataque. (Inicialização (md0) e SO (md1)) Na semana passada, uma das unidades falhou, então eu pedi uma nova. Hoje eu desliguei o servidor, instalei o novo servidor e tentei adicionar a nova unidade de volta ao raid. Por algum motivo, foi adicionado como reserva em vez de ativo.
Aqui estava o status da invasão depois que a unidade com falha foi removida:
[root@server ~]# mdadm --detail /dev/md0
/dev/md0:
Version : 1.0
Creation Time : Mon Nov 25 18:01:08 2013
Raid Level : raid1
Array Size : 511936 (500.02 MiB 524.22 MB)
Used Dev Size : 511936 (500.02 MiB 524.22 MB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent
Update Time : Thu Feb 20 15:19:05 2014
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Name : 0
UUID : ff06d319:b29fb1b0:7be4fded:5eff1a05
Events : 372
Number Major Minor RaidDevice State
3 8 97 0 active sync /dev/sdg1
1 0 0 1 removed
[root@server ~]# mdadm --detail /dev/md1
/dev/md1:
Version : 1.1
Creation Time : Mon Nov 25 18:01:09 2013
Raid Level : raid1
Array Size : 249414464 (237.86 GiB 255.40 GB)
Used Dev Size : 249414464 (237.86 GiB 255.40 GB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Thu Feb 20 15:20:22 2014
State : active, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Name : 1
UUID : 5141caf1:c7c81553:0f1fa3fa:2ffdf6bd
Events : 4813017
Number Major Minor RaidDevice State
0 8 98 0 active sync /dev/sdg2
1 0 0 1 removed
Eu então executei os seguintes comandos:
[root@server ~]# sfdisk -d /dev/sdg | sfdisk /dev/sdh --force
[root@server ~]# mdadm --manage /dev/md0 --add /dev/sdh1
mdadm: added /dev/sdh1
[root@server ~]# mdadm --manage /dev/md1 --add /dev/sdh2
mdadm: added /dev/sdh2
Eu os deixo reconstruir e agora recebo isso para o MD1.
[root@server ~]# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdh1[2] sdg1[3]
511936 blocks super 1.0 [2/2] [UU]
md1 : active raid1 sdh2[2](S) sdg2[0]
249414464 blocks super 1.1 [2/1] [U_]
bitmap: 2/2 pages [8KB], 65536KB chunk
Informações mais detalhadas:
[root@server ~]#mdadm --detail /dev/md0
/dev/md0:
Version : 1.0
Creation Time : Mon Nov 25 18:01:08 2013
Raid Level : raid1
Array Size : 511936 (500.02 MiB 524.22 MB)
Used Dev Size : 511936 (500.02 MiB 524.22 MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Thu Feb 20 15:22:51 2014
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : 0
UUID : ff06d319:b29fb1b0:7be4fded:5eff1a05
Events : 393
Number Major Minor RaidDevice State
3 8 97 0 active sync /dev/sdg1
2 8 113 1 active sync /dev/sdh1
[root@server ~]# mdadm --detail /dev/md1
/dev/md1:
Version : 1.1
Creation Time : Mon Nov 25 18:01:09 2013
Raid Level : raid1
Array Size : 249414464 (237.86 GiB 255.40 GB)
Used Dev Size : 249414464 (237.86 GiB 255.40 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Thu Feb 20 16:34:34 2014
State : active, degraded
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1
Number Major Minor RaidDevice State
0 8 98 0 active sync /dev/sdg2
1 0 0 1 removed
2 8 114 - spare /dev/sdh2
Alguém pode me dizer por que isso aconteceu? A última vez que eu corri para isso acabei perdendo todo o volume. Eu só quero fazer o MD1 voltar a funcionar corretamente.
Tags raid linux software-raid