Disques inutilisables après panne électrique

Comment utiliser TestDisk pour récupérer une partition perdue
Locked
Message
Author
samuel
Posts: 2
Joined: 30 May 2020, 12:41

Disques inutilisables après panne électrique

#1 Post by samuel »

Bonjour à tous.

Je suis photographe et je viens de perdre quinze années d'archives précieuses suite à une panne électrique ayant endommagé les deux disques durs stationnés sur un double dock. Je travaille sous Mac mais j'ai un dual boot sur mon iMac, et mes disques durs étaient également accessibles depuis ma session Windows. J'ai également une interface Ubuntu sur le portable que je tente d'utiliser pour récupérer mes données avec Testdisk.

C'est la première fois de ma vie que j'ai affaire à un problème de ce genre. Cependant, mes disques ne faisant aucun bruit suspect, je me suis dit que je devais peut-être tenter quelque chose avant de m'adresser à un service coûteux. Cela fait une semaine que je potasse de la documentation au sujet de Testdisk, pour m'assurer de ne faire aucune manoeuvre irréversible. Je me suis entraîné sur des clés USB ou des petits disques durs, avec pour seul bémol que ceux-ci étaient "sains" ...

Ainsi, avec le premier de mes disques (celui qui contient les données les moins sensibles) que j'explore avec Testdisk, je bute d'emblée sur le premier obstacle : la taille détectée ne correspond pas à la taille réelle du disque : Il s'agit d'un Seagate Barracuda de 4To. (cf log)

Sat May 30 13:32:50 2020
Command line: TestDisk

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 4.15.0-64-generic (#73-Ubuntu SMP Thu Sep 12 13:16:13 UTC 2019) x86_64
Compiler: GCC 7.2
ext2fs lib: 1.44.1, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.0
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 488397168 sectors
/dev/sda: user_max 488397168 sectors
/dev/sda: native_max 488397168 sectors
/dev/sda: dco 488397168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63, sector size=512 - Hitachi HTS545025B9A300, S/N:090624PB4200QSH5TSAG, FW:PB2OC64G
Disk /dev/sdd - 1801 GB / 1678 GiB - CHS 219051 255 63, sector size=512 - Generic External, FW:2.12
Disk /dev/sde - 4000 GB / 3725 GiB - CHS 486397 255 63, sector size=512 - WD Elements 2620, FW:1018

Partition table type (auto): EFI GPT
Disk /dev/sdd - 1801 GB / 1678 GiB - Generic External
Partition table type: Intel

Lorsque je lance une recherche puis une recherche étendue, Testdisk détecte un nombre incalculable de partitions HFS (erronées ce me semble) :


Analyse Disk /dev/sdd - 1801 GB / 1678 GiB - CHS 219051 255 63
Geometry from i386 MBR: head=255 sector=63
BAD_RS LBA=1 16450559
check_part_i386 1 type EE: no test
Current partition structure:
1 P EFI GPT 0 0 2 267349 89 3 4294967294

Bad relative sector.
No partition is bootable

search_part()
Disk /dev/sdd - 1801 GB / 1678 GiB - CHS 219051 255 63

HFS+ magic value at 33/232/8
part_size 7813365344
HFS 33 232 8 486393 104 15 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=544768, size=7813365344, end=7813910111, disk end=3519069872)

HFS+ magic value at 35/209/47
part_size 7813365344
HFS 35 209 47 486395 81 54 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=575488, size=7813365344, end=7813940831, disk end=3519069872)

HFS+ magic value at 37/24/52
part_size 7813365344
HFS 37 24 52 486396 151 59 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=595968, size=7813365344, end=7813961311, disk end=3519069872)

HFS+ magic value at 38/127/26
part_size 7813365344
HFS 38 127 26 486397 254 33 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=618496, size=7813365344, end=7813983839, disk end=3519069872)

HFS+ magic value at 39/229/63
part_size 7813365344
HFS 39 229 63 486399 102 7 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=641024, size=7813365344, end=7814006367, disk end=3519069872)

HFS+ magic value at 40/7/32
part_size 7813365344
HFS 40 7 32 486399 134 39 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=643072, size=7813365344, end=7814008415, disk end=3519069872)

HFS+ magic value at 42/82/41
part_size 7813365344
HFS 42 82 41 486401 209 48 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=679936, size=7813365344, end=7814045279, disk end=3519069872)

HFS+ magic value at 45/162/54
part_size 7813365344
HFS 45 162 54 486405 34 61 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=733184, size=7813365344, end=7814098527, disk end=3519069872)

HFS+ magic value at 48/243/4
part_size 7813365344
HFS 48 243 4 486408 115 11 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=786432, size=7813365344, end=7814151775, disk end=3519069872)

HFS+ magic value at 52/68/17
part_size 7813365344
HFS 52 68 17 486411 195 24 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=839680, size=7813365344, end=7814205023, disk end=3519069872)

HFS+ magic value at 52/198/19
part_size 7813365344
HFS 52 198 19 486412 70 26 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=847872, size=7813365344, end=7814213215, disk end=3519069872)

HFS+ magic value at 52/230/51
part_size 7813365344
HFS 52 230 51 486412 102 58 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=849920, size=7813365344, end=7814215263, disk end=3519069872)

HFS+ magic value at 53/138/22
part_size 7813365344
HFS 53 138 22 486413 10 29 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=860160, size=7813365344, end=7814225503, disk end=3519069872)

HFS+ magic value at 54/110/57
part_size 7813365344
HFS 54 110 57 486413 238 1 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=874496, size=7813365344, end=7814239839, disk end=3519069872)

HFS+ magic value at 58/196/11
part_size 7813365344
HFS 58 196 11 486418 68 18 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=944128, size=7813365344, end=7814309471, disk end=3519069872)

HFS+ magic value at 59/103/45
part_size 7813365344
HFS 59 103 45 486418 230 52 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=954368, size=7813365344, end=7814319711, disk end=3519069872)

HFS+ magic value at 60/11/16
part_size 7813365344
HFS 60 11 16 486419 138 23 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=964608, size=7813365344, end=7814329951, disk end=3519069872)

HFS+ magic value at 61/113/53
part_size 7813365344
HFS 61 113 53 486420 240 60 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=987136, size=7813365344, end=7814352479, disk end=3519069872)

HFS+ magic value at 62/21/24
part_size 7813365344
HFS 62 21 24 486421 148 31 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=997376, size=7813365344, end=7814362719, disk end=3519069872)

HFS+ magic value at 62/118/57
part_size 7813365344
HFS 62 118 57 486421 246 1 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=1003520, size=7813365344, end=7814368863, disk end=3519069872)

HFS+ magic value at 63/156/30
part_size 7813365344
HFS 63 156 30 486423 28 37 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=1021952, size=7813365344, end=7814387295, disk end=3519069872)

HFS+ magic value at 63/188/62
part_size 7813365344
HFS 63 188 62 486423 61 6 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=1024000, size=7813365344, end=7814389343, disk end=3519069872)

HFS+ magic value at 64/0/1
part_size 7813365344
HFS 64 0 1 486423 127 8 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=1028160, size=7813365344, end=7814393503, disk end=3519069872)

HFS+ magic value at 69/24/20
part_size 7813365344
HFS 69 24 20 486428 151 27 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
This partition ends after the disk limits. (start=1110016, size=7813365344, end=7814475359, disk end=3519069872)
Search for partition aborted

Aucune ne semble récupérable, aucune n'est déployable avec la lettre p pour en explorer le contenu.

Disk /dev/sdd - 1801 GB / 1678 GiB - CHS 219051 255 63
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (1801 GB / 1678 GiB) seems too small! (< 4001 GB / 3726 GiB)
The following partitions can't be recovered:
HFS 33 232 8 486393 104 15 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 35 209 47 486395 81 54 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 37 24 52 486396 151 59 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 38 127 26 486397 254 33 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 39 229 63 486399 102 7 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 40 7 32 486399 134 39 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 42 82 41 486401 209 48 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 45 162 54 486405 34 61 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 48 243 4 486408 115 11 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 52 68 17 486411 195 24 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 52 198 19 486412 70 26 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 52 230 51 486412 102 58 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 53 138 22 486413 10 29 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 54 110 57 486413 238 1 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 58 196 11 486418 68 18 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 59 103 45 486418 230 52 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 60 11 16 486419 138 23 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 61 113 53 486420 240 60 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 62 21 24 486421 148 31 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 62 118 57 486421 246 1 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 63 156 30 486423 28 37 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 63 188 62 486423 61 6 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 64 0 1 486423 127 8 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB
HFS 69 24 20 486428 151 27 7813365344
HFS+ blocksize=8192, 4000 GB / 3725 GiB

Results

interface_write()

No partition found or selected for recovery

Je ne suis pas du tout expert en récupération de données, c'est pourquoi je viens chercher de l'aide. Mon idée était de repérer la partition où étaient stockées mes données, de les transférer sur un autre support, et de voir si ensuite je pouvais reformater le disque endommagé. Y a-t-il une étape que je loupe ? Quels sont les outils à employer au préalable lorsque la taille détectée ne correspond pas ? Je précise que ce qui m'oriente vers une panne logique est que mes deux disques posés sur le double dock semblent souffrir de la même panne, tandis que mon disque de sauvegarde posé sur un autre dock continue à fonctionner parfaitement.
Je serais éminemment reconnaissant d'avoir quelques indications sur la marche à suivre.

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Disques inutilisables après panne électrique

#2 Post by cgrenier »

En tant qu'utilisateur root, essayez la commande "hdparm -iI /dev/sdd".
Est-ce que la capacité est toujours mauvaise et le modèle non reporté ? Il faudrait tester le disque sur l'autre emplacement du dock et si possible directement en SATA si vous avez accès à un autre ordinateur.

samuel
Posts: 2
Joined: 30 May 2020, 12:41

Re: Disques inutilisables après panne électrique

#3 Post by samuel »

Bonsoir,
Je vous remercie pour votre réponse.

Voici le retour de hdparm (l'appareil est détecté en /sdc, j'ai eu besoin de l'autre dock) :

/dev/sdc:
HDIO_GET_IDENTITY failed: Invalid argument

ATA device, with non-removable media
Model Number: ST4000DM004-2CV104
Serial Number: ZFN2H45N
Firmware Revision: 0001
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
Used: unknown (minor revision code 0x006d)
Supported: 10 9 8 7 6 5
Likely used: 10
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 7814037168
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 3815447 MBytes
device size with M = 1000*1000: 4000787 MBytes (4000 GB)
cache/buffer size = unknown
Form Factor: 3.5 inch
Nominal Media Rotation Rate: 5425
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Recommended acoustic management value: 208, current value: 208
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* DOWNLOAD_MICROCODE
Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
SET_MAX security extension
* 48-bit Address feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* WRITE_{DMA|MULTIPLE}_FUA_EXT
* 64-bit World wide name
Write-Read-Verify feature set
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
unknown 119[6]
* unknown 119[7]
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
* READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
DMA Setup Auto-Activate optimization
Device-initiated interface power management
* Software settings preservation
unknown 78[7]
* SMART Command Transport (SCT) feature set
* SCT Write Same (AC2)
* SCT Data Tables (AC5)
unknown 206[7]
unknown 206[12] (vendor specific)
unknown 206[13] (vendor specific)
* DOWNLOAD MICROCODE DMA command
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
supported: enhanced erase
490min for SECURITY ERASE UNIT. 490min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000c500c2f17fe8
NAA : 5
IEEE OUI : 000c50
Unique ID : 0c2f17fe8
Checksum: correct

Avant même de passer par hdparm, je me suis aperçu que mon portable était désormais capable de monter le disque. Néanmoins, les deux grands dossiers dont je cherche à récupérer le contenu apparaissent dans l'explorateur, mais barrés d'une croix : "Error opening directory '/media/sam/Leviathan/Documents': Permission non accordée".

Et cette fois, Testdisk reconnaît le disque avec la bonne capacité :

Tue Jun 2 20:29:10 2020
Command line: TestDisk

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 4.15.0-64-generic (#73-Ubuntu SMP Thu Sep 12 13:16:13 UTC 2019) x86_64
Compiler: GCC 7.2
ext2fs lib: 1.44.1, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.0
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 488397168 sectors
/dev/sda: user_max 488397168 sectors
/dev/sda: native_max 488397168 sectors
/dev/sda: dco 488397168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63, sector size=512 - Hitachi HTS545025B9A300, S/N:090624PB4200QSH5TSAG, FW:PB2OC64G
Disk /dev/sdb - 4000 GB / 3726 GiB - CHS 486401 255 63, sector size=512 - Dual Drive Dock 1

Partition table type (auto): EFI GPT
Disk /dev/sdb - 4000 GB / 3726 GiB - Dual Drive Dock 1
Partition table type: EFI GPT

Analyse Disk /dev/sdb - 4000 GB / 3726 GiB - CHS 486401 255 63
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=7814037167 (expected 7814037167)
hdr_lba_start=34
hdr_lba_end=7814037134
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
Current partition structure:
1 P EFI System 40 409639 409600 [EFI System Partition]
2 P Mac HFS 409640 7813774983 7813365344

Néanmoins, allant plus avant, il refuse toujours de me donner accès au contenu des partitions pour le copier ailleurs :

dir_partition inode=0
EFI System 40 409639 409600 [EFI]
FAT32, blocksize=512, 209 MB / 200 MiB
FAT: cluster=2(0x2), pos=6374
Directory /


dir_partition inode=0
EFI System 46 409645 409600 [EFI]
FAT32, blocksize=512, 209 MB / 200 MiB
FAT: Directory entry is marked as free.
FAT: cluster=2(0x2), pos=6380
Directory /

interface_write()

No partition found or selected for recovery
simulate write!

TestDisk exited normally.

Je précise que Photorec a exploré le disque pendant tout le weekend, sans rien ramener de vraiment exploitable (toutes mes images ont été interprétées comme des fichiers texte).
Par ailleurs, je n'ai pas la possibilité de monter le disque en sata depuis mon domicile et avec mon équipement.
Je vous remercie de m'avoir aidé jusque là, je m'interroge sur l'étape suivante.

Samuel.

Locked