Thursday, April 2, 2009

Disk full!

Last night, the root partition on my mythbox reached 100% capacity. I've been dreading this moment, because the partition is rather small (4.6 GB) and has been more than 80% full for a while now. What put it over the edge? Last night, I attempted to burn some recordings to DVD with MythArchive, and the transcoded MPEG file (which would take up to 4 GB for a full DVD) gets stored under /var/lib. Oops.

I'm actually rather impressed that the system didn't die or even panic; processes that needed disk access simply quietly failed. Unfortunately, one of these processes was mythfilldatabase, so I managed to miss a recording due to this issue.

To mitigate this full disk problem, I had the brilliant idea of moving part of my root partition onto my /myth partition (which is ridiculously huge compared to root), and then symlinking it back to its original location. I wasn't crazy enough to try doing this with anything really critical, like /usr or /bin, but I thought /usr/share would be reasonably safe. I used rsync to copy files over to /myth, and then rebooted. The system came back up fine, but then MythTV launched into a database setup screen. Oh. No. Did I somehow hose my MythTV database?! But no, it was just that the MySQL daemon wouldn't start with a symlinked /usr/share for reasons that I can't even pretend to comprehend. After restoring the original /usr/share, MySQL and MythTV behaved normally.

I settled on moving/symlinking large /usr/share subdirectories, like kde4, doc, fonts, and foomatic. THis seems to be working fine, and it allowed me to free up almost 1 GB of acreage on root. Not too shabby.

Someday soon, I'm going to just stick another disk in the machine. Disks are so cheap these days. Heck, I even have a 500GB disk laying around (from a linux box that went boom), but it's SATA, so I first need to buy a controller card.

No comments:

Post a Comment