Fun stuff: During operation, one HDD in a 4-disk #btrfs raid1 setup completely lost its gpt partition info. After unmounting, I tried to fix it with #testdisk but it found several unknown partitions and the whole disk seemed unfixable. But then I recreated the partition with #fdisk and ... could luksOpen the partition and mounted the btrfs raid1 without problems :)

Very disappointed with my cheap NVMe enclosures

My son was able to show me how a kid can burn a decent office laptop by playing at Roblox... 🤦‍♂️

The problem then was to recover the data (no backup) so I used a NVMe-to-USB-C adapter I bought in the past, but when I connected it to my laptop it was showing me the disk as eMMC, showed me a weird partitions scheme. Since it was my first time dealing with a USB-C enclosure, I decided to buy another one, this time NVMe-to-USB-3, but still recognized as an eMMC with the same weird partition table.

Therefore I assumed the drive was corrupted and I spent hours and hours with #testdisk trying to recover the disk structures but unsuccessfully.

Eventually I realized my crapbook had an NVMe slot and I decided to give it a shot. When I plugged the drive and booted the laptop I was able to get all the correct NVMe partitions, #Windows and #Debian #Linux.

WTF... Those enclosures revealed to be totally unreliable, I don't know why the they must lie to the system and let them being recognized as a differente kind of drive (eMMC). That sucked, it prevented to recover the data! I couldn't plug my drive to browse it as any other regular USB enclosure.

I guess if I format and use as external drive is just fine, but totally useless to recover data from an existent partition scheme. I don't know if this is the standard for using NVMe drives from an external enclosure; did you experience the same too?

🤷‍♂️

Gut, dass es #TestDisk gibt: Jemand überschrieb versehentlich eine Partitionstabelle (GPT). Darauf befand sich nur eine #LUKS2-Partition. Mit #TestDisk ließ sich das zum Glück regeln.

Aber ganz trivial war es dann doch nicht: TestDisk erkennt nur die Minimalgröße von LUKS-Partitionen und stellt diese wieder her und kennt nicht das tatsächliche Ende. Und entschlüsseln ließ sich das Ding auch nicht: "Invalid argument" nach korrekter Angabe des Schlüssels.

Stellt sich raus: Die Partitionsgröße muss ein Vielfaches der Sektorgröße (hier 4096) sein, sonst geht da gar nix. Also auf die nächstgrößere Partitionsgröße mit parted erweitert und dann gings.  

#Linux #Encryption #LUKS

[SOLVED] Failed to decrypt LUKS2 encrypted disk after resizing / Newbie Corner / Arch Linux Forums

Récupérer ses données perdues avec TestDisk & Photorec

https://tube.lacaveatonton.ovh/w/nhkKoPfnGDPrTbTsjkjBC4

Récupérer ses données perdues avec TestDisk & Photorec

PeerTube
Récupération de données perdues avec TestDisk, Photorec & DDRescue

YouTube

Muita discussão interessante rolando no fidigerson e eu... há três dias tentando recuperar um arquivo.   
Provavelmente a parte de recuperar é a mais simples. O difícil é encontrar o diacho do arquivo numa montanha de arquivinhos... Fiz logo um script shell pq a quantidade tá brutal.

#testdisk #photorec #recuperaçãodearquivos #shellscript #shell #bash

Come recuperare dati con TestDisk e PhotoRec su GNU/Linux

Può capitare a tutti: un disco che smette di avviarsi, una partizione che scompare, oppure una formattazione fatta per errore. Prima di arrendersi, nel mondo del software libero esistono due strumenti potentissimi per tentare il recupero dei dati: TestDisk e PhotoRec. In questa guida vediamo passo per passo come usarli su GNU/Linux (Debian, Ubuntu e derivate), con un approccio prudente e orientato alla sicurezza dei dati.

OpenSalerno

Should have known better to mess around with parted after a long convention weekend. Did a fucky-wucky, uwu.

Good news is I back up this machine regularly and it's mostly just used for monitoring zoneminder and proxmox, so nothing of value was lost.

Anyways always make sure your first command in parted is 'select <correct/device>' or you will be unhappy like me. And no, testdisk could not save me here.

#linux #parted #mistake #cli ##testdisk #oops

Grosse frayeur la semaine dernière après avoir vu disparaître tout mes fichiers de mon PC.   Sans compter ces affreux programmes qui vous font miroiter la récupérarion de fichiers à des tarifs prohibitifs. J'ai eu de la chance de tomber sur ce tutoriel pour #Testdisk sur #LeCrabeInfo. Il m'aura fallu quelques minutes pour récupérer tout mon disque dur. Ouf!  ... Si ça vous arrive:
https://lecrabeinfo.net/tutoriels/testdisk-recuperer-une-partition-de-disque-perdue-supprimee-non-accessible-ou-en-raw/
TestDisk : récupérer une partition de disque perdue, non accessible ou en RAW

TestDisk est un logiciel open source qui permet de restaurer des partitions de disque perdues, supprimées, endommagées, non accessibles ou passées en RAW sur Windows et Linux. Il vous permet ainsi de…

Le Crabe Info
Un utilitaire #logiciellibre qui a fait ses preuves et qui j'espère va pouvoir me sortir encore une fois dune mauvaise passe. Potentiellement 800mo à récupérer ..que les dieux de la data soient avec moi  
#linux
#testdisk