Please help! Unknown error when apfs-inspect #12
Replies: 44 comments 9 replies
-
also, when I ran fsck it says Object map is invalid. |
Beta Was this translation helpful? Give feedback.
-
Output of There are a couple of possible (but exceedingly unlikely) error conditions for The actual "ABORT: Unknown error" message you are seeing appears when I've been meaning to sort out this project for a long time now, but hey, life gets in the way. Hopefully I'll have a week or two in November to dedicate to working on this. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply. I tried the unstable branch (on another mac), and still got the "ABORT unknown error". I assume that maybe it has something to do with the USB adapter. The thing is Apple uses its own proprietary hardware interface, so I have no way of directly attach the SSD to a machine's SATA port. It means I can only access it thru an adapter of some sort. I will try to get another adapter from another brand, and see if any thing different will appear. Also, here are the outputs from diskutil: (shows as disk3s1 on this machine) Thanks once again for your help, hope all the best! |
Beta Was this translation helpful? Give feedback.
-
I know it's kinda dumb but I ran the repair in disk utility and it gave me this. I don't know whether this would give some more info or not. But I wanna post anyway. I also tried to unmount other volumes on the same SSD, and I also tried to do this in recovery mode. It always give me the same error message. |
Beta Was this translation helpful? Give feedback.
-
This is telling you that a repair cannot be done whilst you are running macOS normally, since one of the volumes is mounted. I would clone the partition or whole disk to another disk (in case the repair actually worsens things) and then attempt repair from macOS Recovery. Hold CMD+R when booting, then open Terminal and find the physical store ID via |
Beta Was this translation helpful? Give feedback.
-
Hi jivanpal, thanks for the reply. Now I have a new adapter, and now I understand that it's actually drive disk2s2. Here is what happened when I ran diskutil verifyVolume:
Then I ran these commands, for you reference. (I am a CS grad student, but please forgive me that I don't have a good understanding of what's going on in the Apple APFS system, please point out any problem here)
|
Beta Was this translation helpful? Give feedback.
-
The output when running apfs-inspect: Also I tried to read somewhere around 0xa4bf0 ~ 0xa4bf2, which is the address I found some of the missing files via Disk Drill. And I got these two results, and it seems something wrong happened around these addresses, I assume?
|
Beta Was this translation helpful? Give feedback.
-
Running the
In all, I know there is /Users/Encholl folder somewhere near 0xa4bf2, (I got that address from Disk Drill), and what kind of "next step" should I take? I hope I've provided enough info for you to find what the problem is. I will provide more info as you request. I lack some knowledge about this kind of file system. I will be very grateful if you could give me some more insight into how I could recover some of the files near that address in the drive. Thanks for your help again, I think I cannot find another knowledgeable guy like you on the Internet. |
Beta Was this translation helpful? Give feedback.
-
Your volume's object map block is at address 0xd6edc. This block only stores metadata about the object map; it isn't the object map B-tree itself. However, it tells you where the B-tree is. Reading that block with We want to use We can either: (a) Check whether virtual OID (b) Fix the blocks which represent the filesystem root, For (a), the way forward is:
For (b), the way forward would be:
Ideally, steps (1) and (2) would be automated, but these tools are not sophisticated enough to do this (implementing this is the main thing I would like to work on right now), as this can be quite case-specific. The The first thing to do would be to see whether a valid instance of the block with virtual OID Best of luck! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply, here is the
|
Beta Was this translation helpful? Give feedback.
-
To be specific, I tried to read multiple addresses, and arrived at these results: 0xa4bf0 (checksum OID XID looks good) By "looks good" I mean they have some values instead of zeroes. |
Beta Was this translation helpful? Give feedback.
-
Here is the object map info:
|
Beta Was this translation helpful? Give feedback.
-
So from the following result, I assume that
|
Beta Was this translation helpful? Give feedback.
-
output relates to 0x404:
|
Beta Was this translation helpful? Give feedback.
-
Oh one more thing here, I have a small portion of files that I have copied years before the incident, and after comparing the two files (one I stored elsewhere, and the other one is recovered using DiskDrill), I found the compositions of the files are wildly different. Here are two files (one good and one bad) for your inspection: two files.zip Maybe somehow the extraction process got mislead and got offset by a few blocks? I don't know. Here is the full output of |
Beta Was this translation helpful? Give feedback.
-
I was just reading back through the thread, and noticed that I previously said:
The instructions I gave were incorrect, apologies for the mistake! I said to check Virtual OID |
Beta Was this translation helpful? Give feedback.
-
Hi jivanpal, This would be something interesting: DDLogExcerpt.txt (I cut this part out of the entire log which is quite long, and it shows where it found to be problematic) I will send an email to you containing two full logs that I got from DiskDrill. (I don't know if they contain any privacy data so I am sending these through email rather than posting all of them here) Here is a screenshot of DiskDrill with the |
Beta Was this translation helpful? Give feedback.
-
Thanks for providing the logs, I received your email 🙂 Unfortunately, there doesn't seem to be much there that I can use — there is also no mention of It certainly will not be block address / Physical OID 0xa4bf2, as we have already checked that. I can only assume that it is Virtual OID 0xa4bf2. We should see what Virtual OID 0xa4bf2 is mapped to, if anything. We know your volume's Omap has Physical OID 0xd6edc, and that Omap's B-tree root node has Physical OID 0xd6ef8. Do the following:
Then you will be presented with a list of the keys in the Omap B-tree's root node, which should be in ascending order of OID. Find the highest listed OID that is less than or equal to 0xa4bf2, then type that entry's index and press ENTER. You will descend that node and be presented with another list of keys in that child node. Repeat this until you are presented with some KEY/VALUE info and the program exits. Please provide all of the output. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply, I am getting these: explore-omap-output.txt
I guess |
Beta Was this translation helpful? Give feedback.
-
It certainly seems like it... let's ignore that, then, and focus on searching for specific dentries. I'll be working on You may have noticed that I have renamed the tool to Drat and released v0.1.0. If you are using the new code, there is now only a single In order to pull the new code, you will need to update your Git remote and change branch to |
Beta Was this translation helpful? Give feedback.
-
Hi Jivan, Running the code gives me this output: 0x404-output.txt It arrives at:
In the log that I provided you yesterday, there were things like Thanks for the support! |
Beta Was this translation helpful? Give feedback.
-
The detailed output you've provided shows that block 0x6250, which the Omap maps Virtual OID 0x404 to, doesn't actually contain data for a block with Virtual OID 0x404 (
Lovely, good to know!
These are remarks about things which are not as they should be, but they are not really useful to us. In particular, your |
Beta Was this translation helpful? Give feedback.
-
Oh gosh, so the omap is completely useless in this case? How come it got completely damaged? I don't quite understand, uh. I will certainly be waiting for your further development on the Thanks for your reply again! |
Beta Was this translation helpful? Give feedback.
-
At least the most recent Omap is; we can check the older ones, too. I will probably add such checks to You can keep an eye on my Trello board if you wish. |
Beta Was this translation helpful? Give feedback.
-
Great! I will be following your Trello board. Hopefully everything goes well with your upcoming developments. I agree that it would a good idea to include Thanks and wish you have a great day. |
Beta Was this translation helpful? Give feedback.
-
Hello, unrelated to your issue, but I have released v0.1.1 and would like to check a bugfix. Here, you ran the command |
Beta Was this translation helpful? Give feedback.
-
Hi Jivan, here is the output:
|
Beta Was this translation helpful? Give feedback.
-
Hi Jivan, Just wondering if everything goes well? Is there a new ETA on development of Wish you have a great day! |
Beta Was this translation helpful? Give feedback.
-
Hi @zhanchengqian, apologies for my absence in recent months. I am dedicating time to working on Drat again, and hope to finish work on v0.2 before the end of the year. If you would still like assistance with this issue, please reply and I will keep you updated on when tree reconstruction is implemented. If not, I will lock this thread soon. |
Beta Was this translation helpful? Give feedback.
-
Hi,
My file system got damaged when I was trying to copy large trunk of files from the drive (apfs encrypted MacBook Pro ssd, I put it inside a third-party ssd-to-usb external case). When I was copying, suddenly it says the directory doesn’t exist, and soon I found out the folder I was copying disappeared.
I tried to do ls in terminal, but no result, it disappeared. Then that night, I downloaded disk drill. Disk drill shows the missing folder but after I recovered the files I found out 50% of the files are garbled, not opening. The other 50% is okay, but anything before November 2017 is non openable.
Then I ran across this GitHub page and I tried to use apfs-inspect and apfs-read, but no success. I think both of these returned ABORT unknown error. I don’t know what happened because the message offers little detail.
I mean these files are not something too important, but are memorable things that I kept during college. I really want to recover these data. The garbled portion is around 35GB. Please help me diagnose the issue. Is it possible to get more detail of why apfs-inspect failed?
Also just FYI, the recovered non-openable files are the same size as the good files. I also have very small portion of the garbled data on another drive (known to be good and can be opened), like 1GB out of the garbled 35GB. I compared the folders that are in common. for example, file A (from the other drive) is 35MB, and the garbled file A (what I recovered) is also 35MB. I compared the hex, the hex has nothing in common, totally garbled in the recovered file.
I was reading the drive on another Mac machine, High Sierra, and the ssd is connected thru ssd-usb3.0 external dongle. This MacBook ssd is extracted out of my MacBook, since it got damaged in a recent incident.
Please help me! I don’t know what caused the data damage, and I don’t understand why Disk Drill recovered some good files and some garbled files. Also, why the apfs-inspect and apfs-read didn’t work at all? I will provide screenshots if needed.
Let me know what I should do next.
Thanks, God bless you all
Beta Was this translation helpful? Give feedback.
All reactions