Creative Commons License
This work is licenced under a Creative Commons Licence.

Notes on partitioning

Just some random notes on partitioning, probably of no use to anyone. These are old. Use ZFS!

Linux Server

Here’s how I partitioned my webserver’s 60Gb IDE harddrive. I’m using the
mod_userdir Apache module, that’s why I created a big /home. This also
assumes that users have chrooted FTP, mail and/or shell accounts to their
home directories. /boot is not needed due to the fact that modern
bootloaders can get past the 1024 cylinder limit.

/ (root)

3Gb, few hundred megs more or less, depending on installed software.

/home

50Gb, files for Apache, FTP and mail users are stored here. When all user
data is on one partition, it’s easy to backup.

/var

6Gb, misc Apache files, logfiles and databases are usually stored here.
By creating a own partition for this, your server can’t be attacked by
trying to use the logfiles to fill your root partition. If you run large
databases, create a larger /var partition than this.

/tmp

512Mb, few hundred megs more or less, depending on system load. By
creating a own partition for this, your server can’t be attacked by
trying to use the temporary files to fill your root partition.

(swap)

Usually 1x to 3x system RAM, depending on load.

/mnt/dataX

Whole disks, network drives, etc.

Dedicated Linux Workstation

Here’s how I partitioned my dedicated Linux workstation’s 60Gb IDE harddrive.
/home has it’s own partition due to ease of backup. /boot is not needed due
to the fact that modern bootloaders can get past the 1024 cylinder limit.

/ (root)

9.5Gb, few hundred megs more or less, depending on installed software.

/home

50Gb, users’ files for are stored here. When all user data is on one
partition, it’s easy to backup.

(swap)

Usually 1x to 3x system RAM, depending on load. I created mine 512Mb.

Dual-boot Linux/Windows Workstation

Here’s how I partitioned my dual-boot workstation’s 60Gb IDE harddrive.
/home has it’s own partition due to ease of backup. /boot is not needed due to
the fact that modern bootloaders can get past the 1024 cylinder limit. A ideal
solution for this would be to run two 60Gb drives, since harddrives are really
cheap nowadays, and to run Linux on one and Windows on the other.

/ (root)

9.5Gb, few hundred megs more or less, depending on installed software.

/home

40Gb, users’ files for are stored here. When all user data is on one
partition, it’s easy to backup. Make this a FAT partition, so that it can be
accessed from Windows, too (corresponds to D: in Windows).

/mnt/win

10Gb, files for Windows are stored here (corresponds to C: in Windows).
This has, obviously, got to be a filesystem type that Windows supports. It’s
recommended that you create it as FAT, since that way it can be read and
written from Linux. Currently, Linux only offers read support for NTFS (NTFS
write support is marked as “dangerous”, though).

(swap)

Usually 1x to 3x system RAM, depending on load. I created mine 512Mb.

FreeBSD Server

This time, I used a 80Gb IDE harddrive. Yes, I know it doesn’t add up
to 80Gb. Blame that on the harddrive manufacturers who insist on that 1Kb
is 1000 bytes (which it’s most certainly not, it’s 1024 bytes).

ad0s1a as / (root)

512Mb

ad0s1b as swap

512Mb

ad0s1c as /var

10Gb

ad0s1f as /tmp

512Mb

ad0s1g as /home

50Gb

ad0s1h as /usr

Rest of drive (a bit over 13Gb).

Tags: ,

Leave a Reply

Spam protection by WP Captcha-Free