Wednesday, June 22, 2011

OmniDiskSweeper finds 247GB in my OS X Volumes directory (Aka: Disappearing drive space)

OmniDiskSweeper is a free utility from the superb OMNI group. I run it periodically. Today it showed me:

  • 1Password is storing 177MB of 1Password backups in Library\Application Support.
  • All my iPod and iOS backups come to 2.1 GB. That's a lot, but not bad for five iPhones and a few iPods (who uses iPods any more?)
  • iPhone software adds up to 1.6 GB (3.1, 2.1, 1.2, 1.1)
  • Caches runs 1.7 GB
  • ITunes Library has swollen to 70GB, mostly due to movies
  • Pictures (Aperture, iPhoto) runs to 80 GB
  • I had 500MB of tunes in Music\Amazon MP3 that were also in iTunes. Not sure how that happened, but obviously I don't need both.
  • I had FileMaker Pro 8 (!) installed once in my Applications folder and once in shared applications
  • Volumes, a "hidden" root unix directory, had 247GB in it. [1]

I freed up a GB or so in minor cleanup, but then I had to decide what to do with Volumes. I'm used to Volumes holding Unix aliases, not folders.

Volumes held two folders named after my Time Capsule backups. One held 227 GB, the other a mere 41GB. They were both created within one day of one another in Jan 2011. The smaller one is a copy of a portion of my drive, the bigger one was the entire drive.

Google couldn't explain these findings, but I found this one reference that sounded interesting ...

Another tip is to look in your /Volumes directory. I once found 100's of megabytes there. It seemed to be a mirror of what had been on a firewire drive that had been unplugged before ejecting. Some program had tried to write to '/Volumes/FireWire/data/'. However since the firewire drive had been removed suddenly, it just created a directory called FireWire/data and wrote it there...

Except I didn't find 100s of MBs, I found 100s of GBs. I am pretty sure Time Machine put them there, and I wonder if it had to do with Time Capsule being offline.

After due consideration I deleted these 600,000+ files. I do, after all, have redundant offsite backups in addition to Time Machine.

[1] You can view it in Terminal, but it's easiest to use the Finder's "Go to Folder" feature and just enter "Volumes".

See also:

Update 6/25/11: Through an Apple Support Group discussions I learned that this isn't terribly rare, and that it's particularly seen with disk cloning software -- probably because of the volume of data they manage. It smells like a deep OS bug -- the OS loses the connection to the "virtual" target in /Volumes and starts writing to the local disk. I wonder if this is more common in 10.6. I am surprised I didn't find more about this on Google, perhaps this post will help. Through the discussion thread I learned of these posts ...

  • Tiger Problems - Disappearing file space: Francine Schwieder wrote this several years ago, but I believe it's all still true. Suggests this is not a new OS X problem.
  • TidBITS Adam Engst: Dealing with Doppelganger Folders in /Volumes: Adam wrote this in 2008. He ran into trouble when using Crashplan ... 
    ... Needless to say, applications should notice the disappearance of a disk, and Matthew Dornquast of Code42 Software said that they had spent nearly 100 hours trying to prevent CrashPlan from writing to a folder in /Volumes if the disk disappeared. However, I received reports of a wide variety of applications suffering from this problem, including the BitTorrent client Azureus, the Perforce version control system, Apple's Xcode development environment, and Mac OS X itself...

    ... More generally, this is an architectural problem in Mac OS X that Apple needs to fix. Although applications bear some responsibility for creating folders in /Volumes when they shouldn't, the operating system should protect itself from such an obvious misuse. Unfortunately, a vast amount of code, both from Apple and other developers, assumes that /Volumes is writable, which means that fixing the problem would require lots of other changes, and Apple hasn't had the fortitude to force such an unpalatable solution on developers....
  • Apple Tips Where did my Disk Space go?: James Pond on multiple causes of disk space loss, including the /Volumes bug.

I've suggested that Onyx add a check for these files in its cleanup process.


1 comment:

Dan Swift said...

Another great app is Grand Perspective which gives a visual representation of what is using the most disk space.