1

I plugged my hard drive as usual and it does not mount. I go into Disk Utility it tells me that there are 2 parts to my hard drive.

The first part is titled AppleAPFSMedia and is uninitialized. I have tried using First Aid on it, but it just fails.

The second part showing in Disk Utility is titled APFS Physical Store disk1s2 and is saying not mounted. I clicked on the Mount option in Disk Utility and it does nothing. I also ran First Aid on it and it said that it was successful and then I tried clicking on Mount again with no luck.

I have done a google search on this and it seems to be the only answer is to format the drive to that it initializes. That means I would lose all the data, which of course I do not.

Here is the output from the First Aid Disk Utility:

Running First Aid on “” (disk2s2)
Repairing storage system
Performing fsck_apfs -y -x /dev/disk2s2
Checking the container superblock.
Checking the space manager.
Checking the space manager free queue trees.
Checking the object map.
Checking volume.
Checking the APFS volume superblock.
The volume Elements was formatted by diskmanagementd (945.200.129) and last modified by apfs_kext (1412.141.1).
Checking the object map.
warning: Unable to read apfs_keylocker prange for fs (0x402) : Bad file descriptor
Checking the snapshot metadata tree.
Checking the snapshot metadata.
Checking the extent ref tree.
error: (oid 0x148df0) apfs_extentref: btn: invalid o_subtype (0xb, expected 0xf)
Extent ref tree is invalid.
The volume /dev/disk2s2 could not be verified completely.
Storage system check exit code is 0.

I found a guide online using something on GitHub https://matt.sh/apfs-object-map-free-recovery but I could not understand how it works.

Any advice other than formatting it or purchasing iBoysoft software?

Hi I added the new request information

MacBook-Pro-new-talal:~ talalzahid$ sudo fsck_apfs -nlS /dev/rdisk2s2
Password:
** Checking the container superblock.
** Checking the space manager.
** Checking the space manager free queue trees.
** Checking the object map.
** Checking volume.
** Checking the APFS volume superblock.
** The volume Elements was formatted by diskmanagementd (945.200.129) and last modified by apfs_kext (1412.141.1).
** Checking the object map.
warning: Unable to read apfs_keylocker prange for fs (0x402) : Bad file descriptor
** Checking the snapshot metadata tree.
** Checking the snapshot metadata.
** Checking the extent ref tree.
error: (oid 0x148df0) apfs_extentref: btn: invalid o_subtype (0xb, expected 0xf)
   Extent ref tree is invalid.
** The volume /dev/rdisk2s2 could not be verified completely.
MacBook-Pro-new-talal:~ talalzahid$ 
Jivan Pal
  • 1,215
  • 10
  • 20
  • Can you provide the output of sudo fsck_apfs -nlS /dev/rdisk2s2 on the terminal? This will ignore snapshots and see if there are any other problems with the filesystem. – Jivan Pal Mar 03 '21 at 14:19
  • Thank you for participating here is the output https://pastebin.com/2kx8mCiy – talalzahid Mar 03 '21 at 16:04
  • Thanks — seems like that didn't do what I expected. Also, from Unable to read apfs_keylocker prange, I gather that your partition/volume is encrypted? In that case, my tool drat that you may have seen will not be of help. It's possible that your partition is not too badly corrupted, in which case apfs-fuse or the libfsapfs tools (as mentioned in the article you linked to, but which I haven't used before) may be of help. I would try using apfs-fuse, which should allow you to mount the volume with e.g. sudo apfs-fuse /dev/disk2s2 ~/mountpoint. – Jivan Pal Mar 03 '21 at 17:55
  • ... which should also prompt you for an encryption password if necessary. Both tools require FUSE, which you can get on macOS with brew install osxfuse if you have Homebrew installed. – Jivan Pal Mar 03 '21 at 17:55
  • the volume is not encrypted it is just an external hard drive, I installed Fuse through homebrew and restarted the computer, entered the command and got sudo: apfs-fuse: command not found – talalzahid Mar 03 '21 at 19:23
  • You need to compile apfs-fuse from the linked source code (read the instructions there): https://github.com/sgan81/apfs-fuse – Jivan Pal Mar 04 '21 at 20:02

0 Answers0