dear Community,
I’m writing as I may have wrecked my system up. I launched disk manager in Windows; as one of my disks was not recognized, and as Windows kindly suggested me to initialize the-said disk, I clicked on « initialize with GPT » - as I thought it was a USB key which was not mounting.
Unfortunately, it was my RAID 5 volume created with mdadm…
So if I understood well, Windows created a GPT partition to replace (?) the existing one mdadm created. Now I can see this RAID disk on Windows, which was not the case before.
Without having touched anything, do you think I can revert back the partition? Any guidance on how to do it?
Any help very very much appreciated!
EDIT 24/06/2023: Thanks for the first answers! I do have backups but not images of the full disks (only at file level, and not everything). I try to check if there is a way to rewrite partition table first (if possible! and how…) to make mdadm work again with existing data, then trying to recover data on the disks themselves (but as it is RAID 5 I predict a lovely mess, isn’t it?), and last resort to just wipe everything and use backed up data (but this is not a challenge nor would be a question here :) ).
(As a bonus, here are the results of some commands (my RAID is mounted under md126, with 3 disks: sda, sdc and sdd - sdb is the storage for OS:
——— PARTED ————
#parted -l
Error: Argument invalide during seek for read on /dev/sda
Retry/Ignore/Cancel? i
Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
OK/Cancel? o
Model: ATA TOSHIBA DTO1ACA3 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
Error: /dev/sdc: unrecognised disk label
Model: ATA TOSHIBA HDWD130 (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
Error: /dev/sdd: unrecognised disk label
Mode1: ATA TOSHIBA HDWD130 (scsi)
Disk /dev/sdd: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknoun
Disk Flags:
Model: Linux Software RAID Array (md)
Disk /dev/md126: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17,4kB 16,8MB 16,8MB Microsoft reserved partition msftres
——— GDISK ———
# gdisk /dev/md126
GPT fdisk (gdisk) version 1.0.6
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/md126: 11721056256 sectors, 5.5 TiB
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 84059E0C-5A54-40A5-A643-39FASFFA047E
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 11721056222
Partitions will be aligned on 8-sector boundaries
Total free space is 11721023455 sectors (5.5 TiB)
Number Start (sector) End (sector) Size Code Name
1 34 32767 16.0 MiB 0C01 Microsoft reserved...
——— MDSTAT ———
# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md126 : active (auto-read-only) raid5 sda[2] sdc[1] sdd[0]
5860528128 blocks super external:/md127/0 level 5, 64k chunk, algorithm 0 [3/3] [UUU]
md127 : inactive sdc2 sda1 sdd0
7560 blocks super external:imsm
unused devices: <none>