Can't repair filesystem with fsck, and TestDisk shows "no partition available"

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
Post Reply
Message
Author
revgrectifier
Posts: 8
Joined: 02 May 2018, 09:26

Can't repair filesystem with fsck, and TestDisk shows "no partition available"

#1 Post by revgrectifier » 05 Jul 2019, 18:35

Hello everyone,

My 4TB external drive just stopped working a few days ago, and shows up on Mac's Disk Utility but I can't access it or repair it. I don't think the problem is mechanical as the HDD was quite new and wasn't used very much. I'm trying anything to repair it.

fsck_hfs -r -d returns:
journal_replay(/dev/disk3) returned 22
** /dev/rdisk3 (NO WRITE)
Using cacheBlockSize=32K cacheTotalBlock=65536 cacheSize=2097152K.
Executing fsck_hfs (version hfs-407.200.4).
Block 2 is not an MDB or Volume Header
Block 7814037165 is not an MDB or Volume Header
volumeType is 0
0000: 0000 0000 0000 0000 0000 0000 0000 0000 |................|
. . .
01b0: 0000 0000 0000 0000 0000 0000 0000 00fe |................|
01c0: ffff eefe ffff 0100 0000 feff ffff 0000 |................|
01d0: 0000 0000 0000 0000 0000 0000 0000 0000 |................|
. . .
01f0: 0000 0000 0000 0000 0000 0000 0000 55aa |..............U.|
unknown volume type
primary MDB is at block 0 0x00
alternate MDB is at block 0 0x00
primary VHB is at block 0 0x00
alternate VHB is at block 0 0x00
sector size = 512 0x200
VolumeObject flags = 0x01
total sectors for volume = 7814037167 0x1d1c0beaf
total sectors for embedded volume = 0 0x00
CheckHFS returned 6, fsmodified = 0
And when I try to repair HFS volume using the .pdf guide, and I go to the Advanced menu, TestDisk says that there is no partition available.

When I use TestDisk to Analyse I get three partitions, all "primary": DOS_FAT_32 (200MB), HFS (3725GB), and another HFS (128MB).

When I select the second partition, the 3725GB one which I think is the one containing all of my files, I'd like to "Write" it but I don't know if it could create more damage, in the case I'm doing something wrong.


How would you proceed?

Thank you very much!

Sponsored links

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

Re: Can't repair filesystem with fsck, and TestDisk shows "no partition available"

#2 Post by recuperation » 05 Jul 2019, 21:51

revgrectifier wrote:
05 Jul 2019, 18:35
Hello everyone,

My 4TB external drive just stopped working a few days ago, and shows up on Mac's Disk Utility but I can't access it or repair it.
Another one bit the dust?

You had a broken driven two months ago:
viewtopic.php?f=6&t=7858&p=25284#p25284

When I select the second partition, the 3725GB one which I think is the one containing all of my files, I'd like to "Write" it but I don't know if it could create more damage, in the case I'm doing something wrong.
The risk depends on the partition scheme used that you do not show. I don't see a risk for GPT. There is a risk for MBR-style schemes.
Your disk size rather suggests GPT.
How would you proceed?
If in doubt, make a backup.
Gather SMART information using smartmontools or similar software.

revgrectifier
Posts: 8
Joined: 02 May 2018, 09:26

Re: Can't repair filesystem with fsck, and TestDisk shows "no partition available"

#3 Post by revgrectifier » 06 Jul 2019, 10:38

recuperation wrote:
05 Jul 2019, 21:51

Another one bit the dust?

You had a broken driven two months ago:
viewtopic.php?f=6&t=7858&p=25284#p25284
One year and two months ago, and bloody hell that was hard to fix...
The risk depends on the partition scheme used that you do not show. I don't see a risk for GPT. There is a risk for MBR-style schemes.
Your disk size rather suggests GPT.
When I analyse selecting EFI_GPT I get:
The following partitions can't be recovered:
Partition Start End Size in sectors
> Mac HFS 7813533180 15626247163 7812713984
Mac HFS 7814037124 7814299267 262144
Interestingly, when I select the biggest one of those two, and on the next step I mark as primary the biggest partition I find (still 3725GB), and then Quit, when I go to Advanced now I see two partitions while before I didn't see anything at all. Tempted to proceed with "Image Creation" on the largest Mac HFS one.

I downloaded smartmontools and ran it, it returned this:
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 0) seconds.
Offline data collection
capabilities: (0x73) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 656) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x30a5) SCT Status supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 100 029 006 Pre-fail Always - 2129111
3 Spin_Up_Time 0x0003 097 096 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 094 094 020 Old_age Always - 6916
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 081 060 045 Pre-fail Always - 121173082
9 Power_On_Hours 0x0032 092 092 000 Old_age Always - 7018 (56 153 0)
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 437
183 SATA_Downshift_Count 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 001 001 000 Old_age Always - 38943
188 Command_Timeout 0x0032 100 007 000 Old_age Always - 141736477874
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 064 050 040 Old_age Always - 36 (Min/Max 26/36)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 097 097 000 Old_age Always - 7014
193 Load_Cycle_Count 0x0032 069 069 000 Old_age Always - 63423
194 Temperature_Celsius 0x0022 036 050 000 Old_age Always - 36 (255 247 0 0 0)
195 Hardware_ECC_Recovered 0x001a 100 064 000 Old_age Always - 2129111
197 Current_Pending_Sector 0x0012 099 096 000 Old_age Always - 568
198 Offline_Uncorrectable 0x0010 099 096 000 Old_age Offline - 568
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 1018 (179 139 0)
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 39243584840
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 100104163551
254 Free_Fall_Sensor 0x0032 100 100 000 Old_age Always - 0

SMART Error Log Version: 1
ATA Error Count: 38644 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 38644 occurred at disk power-on lifetime: 7005 hours (291 days + 21 hours)
When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
25 d5 88 ff ff ff 4f 00 10:37:24.685 READ DMA EXT
b0 d5 01 c0 4f c2 00 00 10:37:24.388 SMART READ LOG
b0 d5 01 00 4f c2 00 00 10:37:24.388 SMART READ LOG
ef 03 46 e8 61 f5 00 00 10:37:24.388 SET FEATURES [Set transfer mode]
ef 03 0c e8 61 f5 00 00 10:37:24.388 SET FEATURES [Set transfer mode]

Error 38643 occurred at disk power-on lifetime: 7005 hours (291 days + 21 hours)
When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
25 d5 88 ff ff ff 4f 00 10:37:02.446 READ DMA EXT
b0 d5 01 c0 4f c2 00 00 10:37:02.136 SMART READ LOG
b0 d5 01 00 4f c2 00 00 10:37:02.136 SMART READ LOG
ef 03 46 e8 61 f5 00 00 10:37:02.136 SET FEATURES [Set transfer mode]
ef 03 0c e8 61 f5 00 00 10:37:02.136 SET FEATURES [Set transfer mode]

Error 38642 occurred at disk power-on lifetime: 7005 hours (291 days + 21 hours)
When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
25 d5 88 ff ff ff 4f 00 10:36:42.323 READ DMA EXT
b0 d5 01 c0 4f c2 00 00 10:36:42.020 SMART READ LOG
b0 d5 01 00 4f c2 00 00 10:36:42.020 SMART READ LOG
ef 03 46 e8 61 f5 00 00 10:36:42.020 SET FEATURES [Set transfer mode]
ef 03 0c e8 61 f5 00 00 10:36:42.020 SET FEATURES [Set transfer mode]

Error 38641 occurred at disk power-on lifetime: 7005 hours (291 days + 21 hours)
When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
25 d5 88 ff ff ff 4f 00 10:36:23.915 READ DMA EXT
b0 d5 01 c0 4f c2 00 00 10:36:23.857 SMART READ LOG
b0 d5 01 00 4f c2 00 00 10:36:23.857 SMART READ LOG
ef 03 46 e8 61 f5 00 00 10:36:23.857 SET FEATURES [Set transfer mode]
ef 03 0c e8 61 f5 00 00 10:36:23.857 SET FEATURES [Set transfer mode]

Error 38640 occurred at disk power-on lifetime: 7005 hours (291 days + 21 hours)
When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
25 d5 88 ff ff ff 4f 00 10:36:07.776 READ DMA EXT
b0 d5 01 c0 4f c2 00 00 10:36:07.725 SMART READ LOG
b0 d5 01 00 4f c2 00 00 10:36:07.725 SMART READ LOG
ef 03 46 e8 61 f5 00 00 10:36:07.725 SET FEATURES [Set transfer mode]
ef 03 0c e8 61 f5 00 00 10:36:07.724 SET FEATURES [Set transfer mode]

SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

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

Re: Can't repair filesystem with fsck, and TestDisk shows "no partition available"

#4 Post by recuperation » 06 Jul 2019, 16:38

Time for duplication of your failing drive!

Code: Select all

1 Raw_Read_Error_Rate 0x000f 100 029 006 Pre-fail Always - 2129111 !!!
7 Seek_Error_Rate 0x000f 081 060 045 Pre-fail Always - 121173082  !!!

Hardware_ECC_Recovered 0x001a 100 064 000 Old_age Always - 2129111  ???

197 Current_Pending_Sector 0x0012 099 096 000 Old_age Always - 568 !!!
198 Offline_Uncorrectable 0x0010 099 096 000 Old_age Offline - 568 !!!
Your drive is about to die.
Compare those lines to other drives you have.
After duplication recheck the SMART parameters again, maybe the figure for attribut 197 exploded...

Rerun testdisk after duplication on the duplicate.

revgrectifier
Posts: 8
Joined: 02 May 2018, 09:26

Re: Can't repair filesystem with fsck, and TestDisk shows "no partition available"

#5 Post by revgrectifier » 06 Jul 2019, 19:02

This sounds strange considering the drive wasn't used very much and was treated delicately.
How do I duplicate a drive I can't access, though? I've read the pdf for testdisk, photorec, etc, and I can't find instructions on how to duplicate a drive.
Do you think it's still worth it to try "Image Creation"?

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

Re: Can't repair filesystem with fsck, and TestDisk shows "no partition available"

#6 Post by recuperation » 06 Jul 2019, 19:23

revgrectifier wrote:
06 Jul 2019, 19:02
This sounds strange considering the drive wasn't used very much and was treated delicately.
A friend of mine has hard disk problems on a regular basis. I don't no why.
SMART parameters don't lie. Your justifications sound like you are beating your drives clandestinely. :)
How do I duplicate a drive I can't access, though?
What you consider "access" is a high level access on file system level.
Your "access" means viewing a drive name, files and folders.
There is an access on low level that you don't notice. SMART parameters and access on sector level is an example for that.

You can see the drive - that is the first indication of access.
You can pull SMART parameters - that is another indication of access.
Hopefully you will successfully duplicate the drive even though you don't have access on file system level.
I've read the pdf for testdisk, photorec, etc, and I can't find instructions on how to duplicate a drive.
I really don't buy that. :)
Do you think it's still worth it to try "Image Creation"?
No, because of the high number of unreadable sectors you need a software that is designed to handle that.

Read the manual. You are allowed :) to use its directory which starts on pdf page 3.
Reading the whole manual is a good thing but in your case it is not needed.

revgrectifier
Posts: 8
Joined: 02 May 2018, 09:26

Re: Can't repair filesystem with fsck, and TestDisk shows "no partition available"

#7 Post by revgrectifier » 06 Jul 2019, 20:43

Didn't check the DDRescue part, only TestDisk! Okay so now I need an identical drive to write the copy to? Can I copy the disk to a file image and then write that disk image to a different disk?
Last edited by revgrectifier on 07 Jul 2019, 09:28, edited 1 time in total.

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

Re: Can't repair filesystem with fsck, and TestDisk shows "no partition available"

#8 Post by recuperation » 07 Jul 2019, 07:47

revgrectifier wrote:
06 Jul 2019, 20:43
Didn't check the DDRescue part, only TestDisk! Okay so now I need an identical drive to write the copy to?
No, you only need another drive with equal or bigger size.
If you duplicate the content of your defective drive into a file, the destination drive has to be a little bit bigger than the source drive because the file system itself needs some space, too.
Can I do copy the disk to a file image and then write that disk image to a different disk?
Yes, you can.

revgrectifier
Posts: 8
Joined: 02 May 2018, 09:26

Re: Can't repair filesystem with fsck, and TestDisk shows "no partition available"

#9 Post by revgrectifier » 08 Jul 2019, 19:59

Currently writing the file image, it's taking a long time. Will update when it finishes, I'd say 2 days left tops.

revgrectifier
Posts: 8
Joined: 02 May 2018, 09:26

Re: Can't repair filesystem with fsck, and TestDisk shows "no partition available"

#10 Post by revgrectifier » 10 Jul 2019, 14:25

Finally it's finished writing that 4TB image.

Now, in order to write that .img file, I've looked around but Disk Utility doesn't mount it, when I double click it it says no mountable filesystem.

I've used

Code: Select all

sudo dd if=path_of_your_image.img of=/dev/rdiskn bs=1m
obviously with my paths but it hasn't helped.

Also on this page it seems like the default would be to have a .dd image and rename it, while I just have an .img.

Tried to run TestDisk on the drive where I saved that 4TB .img file hoping there would be an option to write it somewhere but with no success...

Post Reply

Who is online

Users browsing this forum: Google Adsense [Bot] and 11 guests