Over time, I have learned some hard lessons with thinking through your partition plan *before* partitioning. Plenty of “D’oh!” moments to be enjoyed by all. First and foremost, I learned not to partition the way Windows does (having just come off of Windows) – one big drive. After a reinstall, losing everything, I learned that it didn’t have to go so badly. As long as the drive is good, you may lose configs, you may lose track of what packages you had installed, you may be in for a long night of tweaking, but you don’t need to lose your stuff.
I now never accept default partitions – it is always worthwhile to look and see what the installer is deciding on your behalf. My typical non-RAID setup now is like this:
- /boot = maybe 70 meg
- /tmp = maybe a gig or two (instead of relying on what is created from RAM) – this provides good support for VMWare virtual machines, which need the space on tmp when making snapshots or suspending, so running out of space here sucks
- /var = one to two gigs for logs, but mostly for urpmi, as it puts the packages in /var/cache/urpmi/rpm and partial – if you install large or lotsa packages (like some games) you can run out of space. Being broken out from the root partion keeps it from filling up root, which can hose things good.
- / = usually set to around 8 to 10 gigs, to have room for packages in /usr and /opt – it really depends on what kinda system is being built, though
- swap = maybe 400 to 600 meg – I know there are specific apps for which you want to follow the 1.5 x RAM rule, but I have never hit them, and observation has shown me that my swap almost never gets touched unless I am cramped for RAM (say, less than 512 meg). So why waste the space?
- /home = everything else, including a folder for favorite apps and for backing up configs. For digital photos, I like to use camdump, then delete /var/spool/camdump and symlink a /home/photos directory back as /var/spool/camdump, to keep my photos and movies on /home and not fill up /var.
I prefer ReiserFS for home stuff, although I have seen good results with XFS too. Ext3 is good for stability, but too many benchmarks seem to show ReiserFS and XFS being faster. I would stick to ext3 for server and SAN environments, though.
I don’t break out /opt and /usr – I used to, but if you reload or upgrade, your probably just going to bust all your packages anyway. Better to go clean, and eliminate variables.
This setup gives me breathing room to play, to run VMs, and to reload if needed without losing /home. After the reload, I can copy configs back in place (I name them with the directory path, such as etc-X11-xorg.conf, so I know where they all go). Hardly any tweaking needed.
And sometimes, that is a good thing.
Filed under: File Systems