0

I have a 6 TB external HDD that cannot be mounted or read after encountering an unexpected power cut off. I think (or want to believe) it is not a hardware damage because at least a few of video files were accessible by the free trial version of Data Drill app that cannot recover the files before purchasing.

Is there any easy way to fix this partition by using only system commands?

I have an almost full (~99%) backup of the HDD. What I want to recover is photo data taken in just last two weeks.

$ diskutil list disk2
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *6.0 TB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                 Apple_APFS Container disk3         6.0 TB     disk2s2
$ sudo gpt -r show disk2
Password:
        start         size  index  contents
            0            1         PMBR
            1            1         Pri GPT header
            2           32         Pri GPT table
           34            6         
           40       409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
       409640  11720635488      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  11721045128            7         
  11721045135           32         Sec GPT table
  11721045167            1         Sec GPT header
$ sudo fsck_apfs -n /dev/disk2  
** Checking the container superblock.
** Checking the space manager.
warning: spaceman main free count 290005006 does not match sum of free counts 290016384
** Checking the space manager free queue trees.
** Checking the object map.
** Checking volume.
** Checking the APFS volume superblock.
** The volume G-DRIVE was formatted by diskmanagementd (1677.141.2) and last modified by apfs_kext (1933.80.3).
** Checking the object map.
error: om: btn: invalid o_oid (0xc9865)
   Object map is invalid.
** The volume /dev/disk2 could not be verified completely.
TestDisk 7.1, Data Recovery Utility, July 2019                                  
Christophe GRENIER <grenier@cgsecurity.org>                                     
https://www.cgsecurity.org                                                      
                                                                                
Disk /dev/disk2 - 6001 GB / 5589 GiB - 11721045168 sectors                      
Current partition structure:                                                    
     Partition                  Start        End    Size in sectors             
                                                                                
 1 P EFI System                    40     409639     409600 [EFI System Partitio
 2 P Apple APFS                409640 11721045127 11720635488                   

Disk Utility

Disk Drill app is able to locate the files on the disk. But the most of data on my HDD are Aperture and Photos libraries, and the latter were migrated from original Aperture libraries. Because of this, the HDD has many many hard links inside that were automatically generated when migrating the Aperture libraries.

It looks that Disk Drill cannot properly handle these hard link files, resulting in a lot of "Orphan" files as shown below. Thus use of Disk Drill is not my handy option.

Disk Drill

2
  • I’m afraid that you’re a bit out of luck here. There’s nothing on the market that’s able to repair APFS volumes as of today besides Disk Utility. So if that fails, you can either (1) try to manually recover files as you have been, (2) contact a professional data rescue service and pay an exorbitant sum to make an attempt at data recovery (if they even support APFS), or (3) cut your losses and improve your future backup strategy. I wish that I had better news for you. APFS has been a nightmare for years.
    – pion
    Feb 23 at 6:59
  • 1
    After several hours googling I found Drat that is able to read broken APFS volumes. github.com/jivanpal/drat I also found a hack to use MacFUSE matt.sh/apfs-object-map-free-recovery but it did not work on my Mac. However, at the moment I have not succeeded in mounting the volume again yet. Feb 23 at 7:37

0

You must log in to answer this question.

Browse other questions tagged .