I have run into trouble with APFS. I have an external hard drive (spinning plates) with two partitions. Some time ago one of these partitions stopped being mounted. Neither Disk Utility nor running fsck could repair it. Disk Utility in recovery mode could not repair it. The partition is not encrypted. All of this is happening on macOS 10.14.6.
I created an image from the entire external drive in hope that I would be able to access the data on the partition from there. This image, when mounted, correctly shows the uncorrupted partition, but the other partition is not mounted and greyed out in Disk Utility.
My investigation showed that the issue is the object map, which has come up a few times in my googling, but with no solutions.
sudo fsck_apfs -l -n -S /dev/disk4s3 ** Checking the container superblock. warning: checkpoint<->superblock disagree for xp 88 ** Checking the EFI jumpstart record. ** Checking the space manager. warning: spaceman chunk 916 free count 4294943744 > block count 32768 warning: spaceman main free count 351394375 does not match sum of free counts 351417927 ** Checking the space manager free queue trees. ** Checking the object map. ** Checking volume. ** Checking the APFS volume superblock. ** The volume Extras was formatted by newfs_apfs (748.57.19) and last modified by apfs_kext (945.220.38). ** Checking the object map. error: (oid 0x231dea) om: btn: invalid o_type (0x40000002) Object map is invalid. ** The volume /dev/disk4s3 could not be verified completely.
I believe the data on the drive is fine, but the few blocks of corrupted APFS make the whole drive unusable.
I know of boysoft data recovery software, but I am not interested in individual files or images etc. from this drive, I want the entire partition (I do wonder however, how is this software able to access files on unmountable drive). I know that had this been HFS system, DiskWarrior could probably rebuild the whole partition, but due to not-fully-documented nature of APFS (WTF Apple?), DiskWarrior people can't help...
I would like to know if there is any way of accessing the data on the unmountable APFS Volume? Or maybe fixing the object map so that the drive can be mounted and browsed?
Any tips would be greatly appreciated...