[SOLVED] Seagate External 5TB (EXT4) Crashed during Backup. Strange situation... Topic is solved

Using TestDisk to repair the filesystem
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
streetdancer
Posts: 3
Joined: 15 Jul 2022, 07:10

[SOLVED] Seagate External 5TB (EXT4) Crashed during Backup. Strange situation...

#1 Post by streetdancer »

Hey everyone at cgsecurity, thank you for the awesome tool TestDisk and this Community!

This is my first time having to perform a data recovery for myself and on Linux.

I was performing a backup two nights ago and didn't get too far using terminator in Debian Linux 11 Bullseye & monitoring i/o (drive is old) using a terminal monitoring tool for hard drives. One of the "tops".

After an hour I looked over at my monitor to find the monitoring was stuck and I checked the clock and the system was frozen. Pretty fresh install w/ 64 gb's ram. I kept having difficulties with the system locking up when trying to back this drive up.

I did a cold shut down. I booted back up and my partition table was destroyed.

Instead of 1 EXT4 partition that I created using GParted; it showed 2 partitions:


Partition: /dev/sdb1 (CAUTION SYMBOL) | File System: unknown | Size: 582.19 GiB
Partition: unallocated | File System: unallocated | Size: 3.98 TiB


I immediately knew this was off. I did some googling and found TestDisk. I did as much research as I could and then realized it was the starting point to remedy.

I installed it on a Debian Laptop (Thinkpad T420) and ran an Analyse:

I chose "ENTER: to Continue" and it showed the following output:

Disk /dev/sdb - 5000GB / 4657 GiB - CHS 608001 255 63
Current partition structure:

Partition Start End Size in sectors


No ext2, JFS, Reiser, cramfs or XFS marker
1 P Linux 0 4 5 76000 41 9 1220942336
1 P Linux 0 4 5 76000 41 9 1220942336
No partition is bootable


I then ran "Quick Search":

To my surprise I got excited and it seen my EXT4 Partition with the proper label "DATASCIENCE-2019".

Disk /dev/sdb - 5000GB / 4657 GiB - CHS 608001 255 63
Partition Start End Size in sectors
>* Linux 0 32 33 608001 74 9 9767538688 [DATASCIENCE-2019]

I navigated my in-tact looking Folders using "P: list files".

Then I pressed "ENTER: to Continue" and it showed the following output:

Disk /dev/sdb - 5000 GB / 4657 GiB - CHS 608001 255 63

Partition Start End Size in sectors
1 * Linux 0 32 33 608001 74 9 9767538688 [DATASCIENCE-2019]

and I chose [Write] "Write partition structure to disk".

Your awesome program told me to reboot for the change to take effect. I chose OK and then restarted and plugged in the drive again (USB) and I now see the drive attempt mount with errors. After scouring google for several hours trying to find the remedy. I think in the *very* beginning of opening TestDisk; it allowed me to choose between PC or GPT (I didn't know that drives over 2.2TB required GPT); I ended up choosing PC.

Before I wrote this partition structure to disk and rebooted. I looked online to find the "default GParted EXT4 partition type" to no avail finding the answer to choose the right one. I chose PC and struck out. (Obviously no fault of yours or your beautiful program).

So now I get the following (which is better; I wasn't able to even attempt to use fsck against a device that didn't have correct partitions pointing to my data). *So I currently feel that's a Win regardless*.

Here is the new message I get (at least I get a message) :lol:

"Error mounting /dev/sdb1 at /media/brandon/DATASCIENCE-2019: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error"

I tried running the following commands:

Code: Select all

# e2fsck -f /dev/sdb1
Results: (I didn't know what I was doing and ran CNTRL+C ... was chicken!)

Code: Select all

Error reading block 610303999 (Invalid argument). Ignore error<y>? no
Superblock has an invalid journal (inode 8).
Clear<y>? cancelled
e2fsck: The journal superblock is corrupt while checking journal for DATASCIENCE-2019
e2fsck: Cannot proceed with file system check

DATASCIENCE-2019: ************** WARNING: Filesystem still has errors *************
&

Code: Select all

# e2fsck -p /dev/sdb1
Results:

Code: Select all

Error reading block 610303999 (Invalid argument).

DATASCIENCE-2019: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
                 (i.e., without -a or -p options)
Not sure how to proceed using TestDisk; is it possible to re-run TestDisk and instead of choosing PC, choose GPT (in hopes it still finds the partition) and then write the correct table, reboot, mount and all is fine and accessible? Or are the chances of that unlikely?

What would be anyone who is familiar with this type of situation, course of action for Remedy?

Any tips and pointers would be greatly appreciated! Thank you all for your time!

Best Regards,
Last edited by streetdancer on 16 Jul 2022, 22:51, edited 1 time in total.

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Seagate External 5TB (EXT4) Crashed during Backup. Strange situation...

#2 Post by recuperation »

If your disk has a sector size of 512 bytes, you should have selected GPT to address the whole space of 5 TB.
I assume that Testdisk proposed this GPT partition table type but you changed it on purpose.
You can rerun this procedure to see what this gives.
Maybe your e2fsck dammaged some structures.

streetdancer
Posts: 3
Joined: 15 Jul 2022, 07:10

Re: Seagate External 5TB (EXT4) Crashed during Backup. Strange situation...

#3 Post by streetdancer »

Actually Testdisk didn't default to anything but the top selection which was PC/Intel. If it would have defaulted to GPT, I would have selected that one. I didn't run e2fsck until after I ran Testdisk. I will go ahead and re-run the Testdisk procedure and see if selecting GPT remedies. Regardless of the outcome I will update this thread! Thank you for the tool, this community and the response!

Best Regards,

streetdancer
Posts: 3
Joined: 15 Jul 2022, 07:10

Re: Seagate External 5TB (EXT4) Crashed during Backup. Strange situation...

#4 Post by streetdancer »

Thank you again everyone! TestDisk fixed it. I ran it against /dev/sdb after getting the error in Debian 11 on auto-mount via USB plugin. This time I selected EFI GPT instead of Top Choice - INTEL (which showed DATASCIENCE-2019 as MSDOS). I wrote the new partition table and rebooted and everything mounted perfect!

Much appreciated! I didn't lose anything it seems :)

Locked