If you've been reading Slaptijack for a while, you might remember that I've been doing personal backups with rsync and hard links. The hard links conserve disk space by making sure I don't have multiple copies of the same file lying around.
I recently added a new drive to my iMac expressly for the purpose of holding my backups. The new drive is external and attached via FireWire (IEEE 1394). When I plugged it in, I chose the Mac OS Extended (Case-sensitive) file system format. I have the benefits of journaling along with the more UNIX-like case-sensitivity.
After setting up the new drive and making the appropriate changes to my backup cronjob, I soon noticed that this drive was filling up. In fact, the second day's backups filled up the drive and killed the rest of the backup process. Comparing the inodes of files (via ls -i
) that had not changed in months, I noticed that hard links were obviously not being used. So, instead of saving disk space, I was using more and more every night.
My research uncovered that, by default, Mac OS X sets external volumes to ignore file ownership. Because of this, rsync
assumed that each file from the source location was different than the files in the link destination directory (--link-dest
) because the owner was different. Clearing the "Ignore ownership on this volume" checkbox in the "Get Info" window for the disk fixed the problem.
Just a bit of administrivia right here. A little Googling shows that Terminal.app ran into the same problem and used the same fix. Miguel's post goes into some additional details that you might find useful. Finally, if the FireWire disk image above looks funky, it's probably because you are using a version of Internet Explorer older than IE7.