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$
sudo fsck_apfs -nlS /dev/rdisk2s2on the terminal? This will ignore snapshots and see if there are any other problems with the filesystem. – Jivan Pal Mar 03 '21 at 14:19Unable to read apfs_keylocker prange, I gather that your partition/volume is encrypted? In that case, my tooldratthat you may have seen will not be of help. It's possible that your partition is not too badly corrupted, in which caseapfs-fuseor thelibfsapfstools (as mentioned in the article you linked to, but which I haven't used before) may be of help. I would try usingapfs-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:55brew install osxfuseif you have Homebrew installed. – Jivan Pal Mar 03 '21 at 17:55apfs-fusefrom the linked source code (read the instructions there): https://github.com/sgan81/apfs-fuse – Jivan Pal Mar 04 '21 at 20:02