Differences between revisions 2 and 3
Revision 2 as of 2009-07-27 09:21:33
Size: 716
Editor: SamatJain
Comment:
Revision 3 as of 2009-11-05 08:35:57
Size: 1851
Editor: SamatJain
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<<TableOfContents>>

== Partitioning guidelines ==

=== /boot ===

768 MB–1 GB, at minimum. This is enough to contain several kernels as well as a bootable ISO (i.e. grml) for use with grub2.

=== / ===

For servers, a 4 GB partition is more than adequate. Most of my servers have less than 1 GB utilization.

For desktops/laptops, 8 GB is adequate for a machine with a set purpose and just running a desktop environment, while doing no/minimal development.

For a development workstation 10 GB or more is good. I always run out of space attempting to install debug packages and/or compile large software collections, such as KDE.

=== /var ===

Space requirements for /var are always increasing. At minimum, 4 GB. If /var and /tmp are merged, 6 GB.

=== /tmp ===

For servers, I notice /tmp is not used often, and usually lies empty. When it does it used, the frequency of use is similar to /var. I'll usually merge tmp and var for this reason (i.e. remount /tmp under /var/tmp).

For desktops, 2-4G is usually fine. I usually aim for the minimum required to store a CD or DVD image when burning discs.

Partitioning guidelines

/boot

768 MB–1 GB, at minimum. This is enough to contain several kernels as well as a bootable ISO (i.e. grml) for use with grub2.

/

For servers, a 4 GB partition is more than adequate. Most of my servers have less than 1 GB utilization.

For desktops/laptops, 8 GB is adequate for a machine with a set purpose and just running a desktop environment, while doing no/minimal development.

For a development workstation 10 GB or more is good. I always run out of space attempting to install debug packages and/or compile large software collections, such as KDE.

/var

Space requirements for /var are always increasing. At minimum, 4 GB. If /var and /tmp are merged, 6 GB.

/tmp

For servers, I notice /tmp is not used often, and usually lies empty. When it does it used, the frequency of use is similar to /var. I'll usually merge tmp and var for this reason (i.e. remount /tmp under /var/tmp).

For desktops, 2-4G is usually fine. I usually aim for the minimum required to store a CD or DVD image when burning discs.

Create and use a swap file

Instead of letting space go to waste in a swap partition, Linux can use a small swap file instead:

   1 sudo dd if=/dev/zero of=/swap-file bs=1M count=255
   2 sudo mkswap /swap-file
   3 sudo swapon /swap-file

To automatically bring it up on reboot, place into fstab:

/swap-file none swap sw 0 0

(!) Note: The Linux kernel does not support sparse files as swap files. It's also best to create the swap file immediately after filesystem creation to insure a contigiuous file. Other than that, choice of filesystem does not matter. Reference on LKML.


CategoryCheatSheet

SamatsWiki: CheatSheet/Partitioning (last edited 2022-06-28 20:12:45 by SamatJain)