Well after having been on FreeBSD 4.x for as long as I can remember (4years now I guess), it's finally time to move to FreeBSD 6.x! For ages I've been saying as soon as I get a larger HDD I'd upgrade the system and santa kindly delivered a shiny new 250Gb Maxtor DiamondMax 10, so it's time to sort it out and make the move.
Funny now I think about it, for me upgrading to a larger capacity HDD has always been a fairly rare occasion. Back in 2000 or so I remember moving from a measily 1.6Gb to a whopping 20Gb HDD and thinking that was way too much. In a way it's a good thing to not have a lot of space - it makes you more tidy and less likely to spam crap all over the filesystem. Of course on the other hand not having a lot of space also sucks if you want to store a lot of stuff (duh). This is kind of how it's been with my FreeBSD server for the last 4yrs or so - I've only had a 40Gb drive and in that time I've hosted over 100 users at the same time, dozens of domains, ran a load of services, and never really had a lot to complain about re lack of space. The main reason for the change I guess is the increased use of broadband/bittorrent which I really need more space to save files to disk for.
I'm gonna document the filesystem layout of the new HDD here, no doubt it'll only be me that ever reads this again (and you if you're reading this heh :o).
File System Layout
I spent quite a while thinking about how best to partition/slice up the new 250Gb disk, mainly because my server is running 24/7 and various applications really do kane the filesystem when accessing data (ie apache and mysql for two). I want to try and partition the disk so that it's more efficient for apache and mysql to read/write from/to the disks.
The other deliberation I went through whilst thinking about the file system layout was where to mount partitions for backups, music, videos and windows application installers. Of course this could be anywhere really - /backups /music /videos /windows for example - but I don't really like spamming the root level filesystem with lots of folders that only add clutter.
I had a quick look at the
Filesystem Hierarchy Standard which is a standard aimed at encouraging clean and consistent filesystem layouts on Unix type OSs and eventually ended up with the following layout:
CODE:
G=Gigabytes
fdisk:
======
Name Size Partition Type
==== ==== ==============
ad1s1 59G freebsd
ad1s2 89G freebsd
ad1s3 49G freebsd
ad1s4 33G freebsd
disklabel:
==========
Partition Mount Size (approx.)
========= ===== ==============
ad1s1:
------
ad1s1a / 0.5G
ad1s1b swap 2G
ad1s1d /tmp 1G
ad1s1e /var/db/mysql 20G
ad1s1f /var/www 10G
ad1s1g /var/ 10G
ad1s1h /usr 20G
ad1s2:
------
ad1s2d /home 40G
ad1s2e /var/backups 50G
ad1s3:
------
ad1s3d /var/media 50G
ad1s4:
------
ad2s4d /var/win32 35G