Files & file changes disappear on APFS volume

I've been trying macOS High Sierra out, with APFS, & have noticed something disturbing. If the Mac crashes files recently created or downloaded have disappeared. Files recently changed have lost the changes. By recently I don't mean in the few minutes before the crash, but at least as far as 3 hours before the crash. I seriously hope this behaviour is resolved before High Sierra goes to public release.


I originally posted this to Apple Support Communities & got an email suggesting I repost here. I wasn't posting chasing solutions, but if anyone has suggestions torwards solutions they're most welcome.

I don't have a solution for you, because I have the same problem. I also have this problem when I just restart my Mac, so it does not apear to be crash related in my case. It seams that the correct stuff is backed up (when backups don't fail - which they do most of the time) and I was able to restore my entire system from backup. It then ran fine for a few days and the problem started again. It seems to manifest itself for me first with Mail complaining that it needs to rebuild the Mail index. This problem may be realted to APFS snapshots: https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/APFS_Guide/Features/Features.html Although, you would think the "crash protection" feature of APFS would prevent these problems.

You may not have a solution as such, but you reply is certainly helpful. Thank you 🙂


That call for Mail to rebuild the index is certainly a warning. I've only so far seen it if Mail or the Mac has crashed. Another warning is if an application reports that it can't save a file. For me that has only happened with Apple applications (perhaps because they're more APFS aware?) when the file is on the APFS boot drive. BBEdit frequently reports that the file I'm editing has been changed on disk when it hasn't. When I see any of these things I quit all applications & cleanly re-start the Mac.

There's a known bug (as in, my Radar was closed as a duplicate) where after a while APFS stops writing to disk. dmesg will show a constant stream of messages like "fs_tx_leave:15561: tx_leave failed: 5" as well as other occasional fs-related errors.


At that point no file writes will actually make it to disk. When you reboot you'll find the filesystem in whatever state it was in when the fs_tx_leave errors started (likely with corrupted half-written files).


I'm shocked that they released a Public Beta with such a big problem. (Assuming the Public Beta is the same 17A291m that we got this morning.)


I've found that on my system if I don't start Mail I'm usually fine for a few days. But once I start up Mail, it will trigger this problem within a few hours.

I had this problem as well. But as long as I don't restart or shutdown, there's no problem somehow.

I can confirm this too – I wonder if this is related to Fusion Drives, as I am using one. Or do did this happen on a full SSD for you? Reverted back to HFS+.

Thanks for your post. This is exactly what I'm seeing. I've stopped using Apple Mail and have started using Spark at the moment. I need to reboot at least once per day to reset the system to prevent this probem. Running on a 3TB Fusion drive on a iMac (Retina 5K, 27-inch, Late 2014).

This problem has started up on my HS APFS install as well. At first there were zero issues. Over the last week, even though the reported free space has remained more or less constant, the file system performance as gone into the toilet. Today it was so bad that I decided to carefully close ALL applications and then do a normal shutdown. Everything went okay until well into the shutdown, when after the expected black screen just before powerdown, I got a pinkish screen with vertical dashed lines running every inch or so and the system HUNG! I gave it 10 minutes or so and finally did a forced powerdown. The system rebooted and I found a LOT of problems. All my message threads were gone (so much for messages in the cloud!), all my Safari extensions were gone, mail had to rebuild the index and I wound up with about 500 messages in recovered folders so I had to sort thru that mess. I don't know what else is screwed up this point.


This seems is a bit late in the development cycle for this level of issues to be popping up, especially in the file system. Given that the APFS rollout in watchOS and iOS gave no issues, I certainly anticipated that APFS in macOS would be at least solid even if slower during the beta. Oh well, I knew the risk with Apple macOS betas. Seeing the issues that APFS is encountering in beta does NOT bode well for getting it solid in the few months remaining before GM. I have a week old clone of my Sierra environment and I may well be taking the steps to cleanse my system of APFS and returning to the know world of HFS+!



UPDATE!

I have had enough! Doing a CC clone to a local HFS+ volume of the HS environment. I will then boot to recovery, delete the AFPS container and install a fresh copy of Sierra followed by a migration of the CC clone.


I sincerely HOPE that Apple can pulll APFS out of the *******, but at this late stage, I have my doubts that it will be ready for the fall GM, at least for the masses. I think Apple really needs to think hard if they want the nightmare of rolling APFS out to the masses before it is rock solid and at least as fast and robust as HFS+!

It would be interesting to know if others like you who are having these issues are also using Fusion drives, I know that the release notes did state that 3TB Fusion drives are not supported at this time 10.13 Beta 2 update 1

What type of drive do you have, Fusion or SSD?

I was running on Fusion. Setup had 4+ years of flawless performance in my mid 2012 15" non-retina MBP. I have successfully returned to HFS+ on a Fusion Drive and while not difficult, it is not straighforward and it does destroy ALL information on the partition (multiple if Fusion is involved). I retained my entire 10.13 PB2 environment and I can say that the difference between 10.13 running APFS vs HFS+ is dramatic! Initially, APFS was acceptable, even if slower, but it steadily degraded. Performance became so abysmal with APFS that CrashPlan could NOT complete a single backup in 24 hours! Once the posted problems popped up, that was the last straw.


For those that might want to return to HFS+ it IS possible.

CarbonCopy Cloner (latest beta) CAN read AFPS and write out a bootable HFS+ clone of the APFS drive. I booted to the CCC clone and then used terminal to execute diskutil apfs deleteContainer disk# (use diskutil apfs list to find the APFS disk#) which removes the APFS container, dissolves the Fusion Drive and formats the drive(s) with HFS+. I then reconstituted my Fusion drive and then installed a fresh virgin copy of 10.13 PB2 followed a data migration from the CCC clone. I then had to explicitly allow the installation of the kext files that my clone apps needed. Everything came back up and performance is now stellar! Back to where it was with Sierra.


I really question if there is time remaining for Apple to pull APFS to the point of sufficient robustness necessary to roll to the mass. Whether I will further mess with AFPS, at least during the beta, is questionable. I do not believe the problems I encounter had anything to do with Fusion as others have run into the same issues where Fusion was NOT involved. Apple's committment to Fusion is substantial as all the new iMacs use it as the standard setup.

When it comes to releaseing a public beta most of these issue do not manifest during an alpha test since only so many people can run the Alpha all at once. so it is likely Apple did not know this issue existed until after the ***** beta released which allowed more users to get the beta from the server at once and run the OS which only then the issues will show, hench why the public beta exist so they can discover these issues. Everyone here in the devleoper forums should know this but including those who download the beta assuming they read the information prior to jumping into something.


If anyone is not okay running the beta without expecting issues to manifest then they should uninstall the beta and go back to the offical released verison 10.12. So lets not start blaming Apple for not properly writing code and perdicting which issues will manifest prior to a release to the public during a BETA TEST keyword being BETA TEST.


anyone whom accept the fact issues like this will show and possibly even more issues lets share and troubelshoot these issues to resolve them and leave apple the information they need to resolve thise issues before the release.




Now time for an answer has anyone attempted to reset the NVRAM as this would most likely invole the NVRAM if that does not work then run a disk check in recovery mode. also try running file check in the terminal.


if all else falls attempt to reinstall the MacOS but be warned as bugs have been popping up were some may get stuck in the boot up.

Same issue here since updating to Beta 4 (and I think the update did not fully complete successfully.) 2017 27” 5K iMac with 24 GB RAM and 1 TB Fusion Drive, converted to APFS since Beta 1 and running fine until Beta 4.


The file system does not retain any changes/writes I make to it, and the Console is filled with messages like "fs_tx_leave:15561: tx_leave failed: 5"


Has anyone found a resolution other than wiping the disk?

I've been experiencing exactly this since I upgraded to High Sierra and APFS. It even happened 2 minutes ago on a reboot. (As it's been happening for months.)


There's my desktop, with folders and files on it that I deleted over 2 hours ago. And there's Mail re-downloading all my mail from the past few hours as well. And Dropbox is re-syncing. All kinds of other things, too (i.e. texts in iMessage...missing. Dock icons that I rearranged back to how they were this morning.) Argh.


What the heck?

i have the kinda same problem. after the last update ( monetary ) my data on APFS drive missing . i checked disk utility and i can see there are my data in the hard drive but nothing visible in the folder , there nothing , i dont know what to do

Files & file changes disappear on APFS volume
 
 
Q