X

Disappearing hard disk space

Disappearing hard disk space

CNET staff
3 min read

In some instances, Mac OS X volumes will display a significantly lower remaining disk capacity than expected based on installed applications and residing files. Sometimes the dramatic loss of space can happen suddenly - after a Mac OS X update or application installation - or gradually over time.

One MacFixIt reader recently wrote:

"I updated to Panther last evening. Everything worked fine and there was about 20+ GB of free HD space available. After running Software Update, and updating to 10.3.3 via the Apple Combined Update, I suddenly had only 20 MB of space left."

Aside from limiting expansion of your data set, low disk space (less than 10% of total capacity in most cases) can cause serious performance problems in Mac OS X.

If you suddenly find yourself with less available disk capacity than you expected, there are some fairly easy measures that can reclaim the lost space.

Corrupted B-Tree Mac OS X's HFS+ filesystem makes heavy use of B-Trees, and as such (even though HFS+ has built-in on-the-fly defragmentation) is subject to B-Tree corruption that can result in disk space measurement errors.

In some cases Apple's Disk Utility (located in Applications/Utilities) will be able to resolve these issues and is a good place to start. However, especially when header node problems are involved, third-party tools like DiskWarrior, Norton Disk Doctor, and Drive 10 can sometimes be more effective.

Leftovers from burned media Another thing to keep in mind is that if you burn a CD or DVD, the recording application (the Mac OS X Finder, Toast, iTunes, etc.) will create a temporary file matching the burned media's size.

Generally, if the temporary files are not immediately deleted, restarting will remove them.

Lack of ram and swapfiles If you run low on RAM, Mac OS X's VM system will create swapfiles. Sometimes - even with a healthy amount of installed memory - these files can become extremely large.

Aside from buying more RAM, you can use a tool like Cocktail to delete swapfiles, though they are likely to refill soon after when more applications are launched without a restart.

To keep track of your disk vs. RAM usage, keep a tool like Menu Meters handy. This application can display current memory usage as either a pie chart, thermometer, history graph, or as used/free totals. The Memory Meter menu shows a breakdown of current memory usage and VM statistics. It can also optionally display a paging indicator light when swapfiles are being used.

Re-apply combo updater In some cases, simply repeating the update installation process can restore seemingly lost disk space.

Check for invalid preference files In some cases, .plist (preference) files can inexplicably swell to enormous sizes. The utility Preferential Treatment (which was mentioned in this month's mac.column.ted) an interface for the plutil command, which can find invalid XML files - all valid .plist files are also valid XML.

Search for extremely large files In addition to seeking out invalid, possibly swollen .plist files, you can also simply perform a search in the Finder (File -> Find) for files that are suspiciously large; 100 MB, 1 GB or 10 GB depending on your volume size and file mix.

A tool like File Buddy can also help you find such files - visible or invisible.

Log files- such as those generated by the Mac OS X Console - can also swell to 10 GB or larger. You can clear these files by using the above search method, or more easily with a utility like Cocktail, or OnyX (freeware).

Feedback? Late-breakers@macfixit.com.

Resources

  • DiskWarrior
  • Norton Disk Doctor
  • Drive 10
  • Menu Meters
  • mac.column.ted
  • File Buddy
  • Cocktail
  • OnyX
  • Late-breakers@macfixit.com
  • More from Late-Breakers