Acabei com meu array mdadm de 3 discos não sendo capaz de montar porque cada um dos discos tinha superblocos corrompidos.
Eu tentei forçar a remontagem da matriz usando
mdadm --create
Isso resultou na capacidade de montar o ataque, mas agora não há sistema de arquivos (ext4). Outros indicadores parecem mostrar que os dados ainda estão lá, mas eu preciso consertar o sistema de arquivos.
Eu tentei consertar o sistema de arquivos vendo se posso restaurar o superbloco:
mkfs.ext4 -n /dev/md0
fsck.ext4 -b <tried_all_of_the_blocks> /dev/md0
Mas eu recebo
fsck.ext4: Filesystem has unexpected block size while trying to open /dev/md0
The superblock could not be read or does not describe a valid ext2/ext4/ext4 filesystem...
Então eu entendo que não há nenhum sistema de arquivos e, portanto, nenhum superbloco válido a partir do qual restaurar o sistema de arquivos.
Eu tenho duas perguntas:
1. Posso usar com segurança o mkfs.ext4 no raid para regenerar o sistema de arquivos, sem perder os dados que parecem estar no array?
2. Posso corrigir o superbloco da matriz usando um backup de um dos discos individuais?
Obviamente, eu não entendo muitas coisas, então eu aprecio sua resposta gentil.
Aqui está a mdadm --examine
output:
root@server:~# mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/md0
/dev/sdb1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : aa70a8ec:192f1719:23bc5df4:1ddac384
Name : server:0 (local to host server)
Creation Time : Sat Oct 28 00:21:46 2017
Raid Level : raid5
Raid Devices : 3
Avail Dev Size : 4294703103 (2047.87 GiB 2198.89 GB)
Array Size : 4294702080 (4095.75 GiB 4397.77 GB)
Used Dev Size : 4294702080 (2047.87 GiB 2198.89 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before=262056 sectors, after=1023 sectors
State : clean
Device UUID : bf5a4ff5:e4e3659e:99caca7c:333475f3
Internal Bitmap : 8 sectors from superblock
Update Time : Sat Oct 28 05:48:33 2017
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 71521ea5 - correct
Events : 3358
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 0
Array State : AAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : aa70a8ec:192f1719:23bc5df4:1ddac384
Name : server:0 (local to host server)
Creation Time : Sat Oct 28 00:21:46 2017
Raid Level : raid5
Raid Devices : 3
Avail Dev Size : 4294703103 (2047.87 GiB 2198.89 GB)
Array Size : 4294702080 (4095.75 GiB 4397.77 GB)
Used Dev Size : 4294702080 (2047.87 GiB 2198.89 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before=262056 sectors, after=1023 sectors
State : clean
Device UUID : 91528c6d:77861852:a1a4f630:9d8eb8ab
Internal Bitmap : 8 sectors from superblock
Update Time : Sat Oct 28 05:48:33 2017
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 9b0ed7c - correct
Events : 3358
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 1
Array State : AAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdd1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : aa70a8ec:192f1719:23bc5df4:1ddac384
Name : server:0 (local to host server)
Creation Time : Sat Oct 28 00:21:46 2017
Raid Level : raid5
Raid Devices : 3
Avail Dev Size : 4294703103 (2047.87 GiB 2198.89 GB)
Array Size : 4294702080 (4095.75 GiB 4397.77 GB)
Used Dev Size : 4294702080 (2047.87 GiB 2198.89 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before=262056 sectors, after=1023 sectors
State : clean
Device UUID : bdc61c9f:321a7ca6:2ed914d0:d10b96a4
Internal Bitmap : 8 sectors from superblock
Update Time : Sat Oct 28 05:48:33 2017
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 27a0a727 - correct
Events : 3358
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 2
Array State : AAA ('A' == active, '.' == missing, 'R' == replacing)
mdadm: No md superblock detected on /dev/md0.
Isso é tudo no Ubuntu Server 16.04, com mdadm
versão 1.2