Lazy Disk Partitioning

24 September 2004

For years, I've religiously partitioned the hell out of my drives when installing Linux on a new machine. It took a while to figure out the proper sizes for my usage, but I've gotten pretty good at it. With my new R40, I got lazy and did only 3 filesystems -- /, /boot, /home.

As I've discovered, I was well-served to partition my previous machines' filesystems further. The problem is that if you do get filesystem errors (which I have twice now, due to crashes or whatever), you're much better off if you can keep the effects isolated.

/var is a very dynamic part of your filesystem. Lots of logs, caches, and temp data are being constantly written there. When you experience a crash, if anything's going to go wrong, /var is a likely place for it to happen. In my laziness, I left /var as part of /. This means that filesystem errors caused by partial data in a /var file can (and did) also affect other more vital parts of the system. Not only did I end up having to reconstruct my /var/lib directory from remnants left in /lost+found, but chunks of my /etc turned up lost as well. I fortunately have backups, so I didn't even really bother trying to reconstruct /etc too much.

Sanity prevails now, and /var lives on the idle partition I had left free for Windows XP. A nice reiserfs seems like a better use for that partition anyway.


Filed Under: ThinkPad-R40 Linux