I bought a 4 TB SSD and transferred all my files from a spinning external HD. I am cleaning up some files on the drive. I notice that when I delete files from the SSD (put them into the Trash and empty it), the space available doesn’t change for a long while then at some point (even takes until say another day) the space available changes. Very odd.
I have it plugged directly into my Mac Mini via USB-C. Even running Disk Utility on it doesn’t help. Any ideas?
According to Apple’s forums, APFS doesn’t do deduplication… It sounds like the deletes are being deferred, possibly “deleted” from view, but macOS deletes in the background or they are flagged as deleted, but not actually removed until the space is needed, or the a clean-up job runs overnight to free up the space.
Just did a quick search.
Do you run Timemachine for backups? If backups are still pending, the data will “vanish” and be marked as purgeable, but remain on the disk until TM has finished its processing on them. It could also be snapshots being held over for a specific period of time.
If you are using TM, you can use the command line tmutil to manage and manually delete the snapshots.
It is possible it isn’t working, is it connected over a USB hub, or directly? It might be the USB hub that causes the issues.
The TM snapshots are the snapshots that TM makes on the SSD, before it backs the data up to another drive or network storage. Backup software, such as TM, can’t backup files that are open and being changed, so it makes a snapshot of how the disk looked (all open files are frozen in time in the snapshot, for example) and it makes the backup using the frozen in time snapshot. Once it is complete, the snapshot is deleted.
It could be a combination of the snapshots and the drive disconnecting. If TM is regularly making snapshots & the drive disconnects before the current backup is complete, when the next scheduled snapshot is due, it makes a new snapshot & continues processing the previous one, only when it is completed is the snapshot deleted and it moves onto the next one.
If the drive is connected over a hub, I’d try connecting it directly first, to eliminate the hub as the problem. If the SSD runs reliably when directly connected, you know the hub is the culprit and needs replacing, not the SSD, if the SSD continues to cause problems, you know it is the SSD that needs replacing.
You could also try using a different cable, to eliminate a dodgy cable or a broken wire that keeps losing contact - E.g. connected most of the time, but a vibration or movement on the desk might cause it to lose contact and thus the drive is “not ejected properly”.
So Disk Utility is actually also checking the TM snapshots even though it is on another disk.
For novices and even people with some technical experience like me, this would be rather perplexing! I still don’t understand why the files need to be retained on the SSD until the snapshot is deleted? What purpose does that serve?
Do you mean the SSD is not included in the list of volumes that TimeMachine will make backups of?
Or do you mean that TimeMachine is backing up to another device?
If the former, then there should be no snapshots on the SSD, only drives that are included in the TimeMachine backup should have these snapshots. The snapshots are stored on the disk being monitored and backed up, not on the destination drive that TimeMachine writes the backups to.
Looking at the results from Disk Utility, the Mac certainly thingk that the SSD is being included in Time Machine backups.
The only explanation that I can think of is that this Apple wants a performance gain for the situation where the user wants to restore one of the files in the TM snapshot - keeping the local copy around for restoring would be much faster than having to copy it across from the TM volume.
I deliberately make sure that all my mac drives are never more than 80% full and I regard the free space reported by macOS as an approximate figure rather than completely accurate.
Overall Time Machine is such a useful capability of macOS. I always make sure to set it up on new machines as its constant, in the background, file archiving has protected me from data loss on many an occasion. I’ll forgive it causing side-effects such as the one you noticed for the benefit of the data protection that it provides.