This site will look better in a browser that supports Web standards, but it is accessible to any browser or Internet device.

April 22, 2009

1993
2001
2002
2003
2004
2005
2006
2007
2008
2009
January
February
March
April
Su M Tu W Th F Sa
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
May
June
July
August
September
October
November
December
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020

Circumventing My Own Retardation

Since I'm too lazy to upgrade my Mac to OS 10.5, I've been using JWZ's backup strategy. For those who don't want to click, it boils down to: Find new hard drives that match your internal drive's connection type and capacity (bigger is allowed). Place the internal drive into an encolsure to make it an external drive. Then, use rsync to copy your whole hard drive to the new drive, making a swap-in bootable backup.

One day, rsync reported a disk-full error and my Mac's hard drive was full. Really full -- the status bar actually said, "Zero KB available." But the backup drive had 200 GB free. What the hell?

After some rooting around, and copying some of my pr0n important documents over to another external drive, I was able to run another backup.

The next morning, rsync had failed again and the drive was almost full again. Time to reformat the backup drive, I guess.

Call up Disk Utility and select the backup drive. Volume name: "Backup". Mounted at... "Backup 1"?!

Fire up the console and cd to /Volumes for a look-see. I get: Jason, Backup, and Backup 1. Backup 1 hasn't been updated since the fifth; Backup is current. OK, select Backup on the desktop (which is mounted to Backup 1 in the command line, remember), and "eject" it.

Crank off another ls -al and Backup 1 is gone. Backup is still there. OK, something ain't right here.

> umount /Volumes/Backup
/Volumes/Backup: not currently mounted.

So, nothing mounted at the mount point I'm staring at. Poke around in the ghost backup, and it's a full copy of my drive from the last successful backup. And my hard drive is almost full.

I form a hypothesis: At some point I ran rsync without actually having the backup disk mounted. Being utterly obedient (and running as root thanks to sudo) it dutifully created the directory /Volumes/Backup and filled my hard drive with... my hard drive. When I tried to mount the actual disk, it saw something in /Volumes taking up space with its name, and adapted as best it could. And since rsync runs from the command line it doesn't work around the goof-up like the UI does. It goes by the mount point, not the disk volume name.

Which leaves me at: I have a good, if outdated, backup on the external drive, and only one way to test the hypothesis.

> sudo rm -r /Volumes/Backup

A few minutes later when rm returned, I still had a functioning computer and 60 gigs of free space. Plugged the backup drive back in, and it mounted in the proper place. So I set off rsync and grabbed myself a beer.

So to recap:

  1. I attempted to run rsync to a drive that wasn't currently mounted.
  2. When rsync ran it did exactly what I asked even though it didnt have an external drive to write to and did the copy to another directory on the primary drive.
  3. This went on for three weeks, until my sparseimage got so big the primary drive couldn't store two copies of it. During this time my backup drive did absolutely nothing.
  4. Unmounting the drive showed the non-existent drive still present.
  5. Deleting everything on the drive reclaimed the space being taken up by the duplicates, and allowed the external drive to mount in the proper place.

I left out the steps that involved cussing and drinking, but that's the basic gist. Moral of the story: Your failing backups and your full hard drive are probably related.

Edit: And now that I've written that, one of the commenters on JWZ's page mentioned that exact same problem. Meaning (1) I'm not the only retard out there (2) Everything old is new again.

Edit, 4/29: Formatting to make the commands stand out a bit.

This page's URL is http://jasonfleshman.org

This page last updated Jul 19, 2019 3:34:19 PM.