You are not logged in.

#1 2018-02-20 08:03:16

lesebas
Member
Registered: 2013-07-10
Posts: 32

[RAID] Accidentaly formatted driver

Hello,

I've accidentally formatted my RAID1 level drive from ext4 to NTFS. As soon as I realized my mistake I cancelled the process. So right now here the output of fdisk :

[sebastien@Aquilam ~]$ sudo fdisk -l
[sudo] Mot de passe de sebastien : 
La table de partitions GPT primaire est corrompue, mais la sauvegarde semble fonctionnelle, elle sera donc utilisée.
Disque /dev/sdc : 1,8 TiB, 2000398934016 octets, 3907029168 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 4096 octets
taille d'E/S (minimale / optimale) : 4096 octets / 4096 octets
Type d'étiquette de disque : gpt
Identifiant de disque : E17C9573-6D2C-4D3D-8A07-7B1105D37C9F

Périphérique Début        Fin   Secteurs Taille Type
/dev/sdc1     2048 3907029134 3907027087   1,8T RAID Linux


La table de partitions GPT primaire est corrompue, mais la sauvegarde semble fonctionnelle, elle sera donc utilisée.
Disque /dev/sdb : 1,8 TiB, 2000398934016 octets, 3907029168 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 4096 octets
taille d'E/S (minimale / optimale) : 4096 octets / 4096 octets
Type d'étiquette de disque : gpt
Identifiant de disque : D54E5785-6607-4644-80E3-ED5C130D5B87

Périphérique Début        Fin   Secteurs Taille Type
/dev/sdb1     2048 3907029134 3907027087   1,8T RAID Linux


Disque /dev/sda : 119,2 GiB, 128035676160 octets, 250069680 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : gpt
Identifiant de disque : 8F2F4E1F-BB2F-4AF9-B063-248F6B84AFCC

Périphérique    Début       Fin  Secteurs Taille Type
/dev/sda1        2048    526335    524288   256M Système EFI
/dev/sda2      526336  63440895  62914560    30G Système de fichiers Linux
/dev/sda3    63440896 250069646 186628751    89G Système de fichiers Linux




Disque /dev/md1 : 1,8 TiB, 2000264691712 octets, 3906766976 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 4096 octets
taille d'E/S (minimale / optimale) : 4096 octets / 4096 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x00000000

As the disks are marked as corrupt GPT table but the backup seems operational (sorry for the french language in the output copy), is there any way to restore the disk, for example formatting by using the GPT table backup?

Offline

#2 2018-02-20 12:39:10

lesebas
Member
Registered: 2013-07-10
Posts: 32

Re: [RAID] Accidentaly formatted driver

After googling my issue I think maybe gdisk can help me to recover the partition table from the backup :

Command (? for help): r

recovery/transformation command (? for help): ?
b	use backup GPT header (rebuilding main)
c	load backup partition table from disk (rebuilding main)
d	use main GPT header (rebuilding backup)
e	load main partition table from disk (rebuilding backup)
f	load MBR and build fresh GPT from it
g	convert GPT into MBR and exit
h	make hybrid MBR
i	show detailed information on a partition
l	load partition data from a backup file
m	return to main menu
o	print protective MBR data
p	print the partition table
q	quit without saving changes
t	transform BSD disklabel partition
v	verify disk
w	write table to disk and exit
x	extra functionality (experts only)
?	print this menu

or with expert mode :

recovery/transformation command (? for help): x

Expert command (? for help): ?
a	set attributes
c	change partition GUID
d	display the sector alignment value
e	relocate backup data structures to the end of the disk
g	change disk GUID
h	recompute CHS values in protective/hybrid MBR
i	show detailed information on a partition
l	set the sector alignment value
m	return to main menu
n	create a new protective MBR
o	print protective MBR data
p	print the partition table
q	quit without saving changes
r	recovery and transformation options (experts only)
s	resize partition table
t	transpose two partition table entries
u	replicate partition table on new device
v	verify disk
w	write table to disk and exit
z	zap (destroy) GPT data structures and exit
?	print this menu

Does anyone know which tool I can use and how?

Offline

Board footer

Powered by FluxBB