Table of Contents
1 Basics and minimal layout (desktop config)
These are the partitions you may, at least, create for a *nux box to work fine and stay stable along updates:
- / (root) partition
- /boot part
Size your swap space following those requirements may keep you out of troubles:
|Amount of RAM in the System||Recommended Amount of Swap Space|
|4GB of RAM or less||a minimum of 2GB of swap space|
|4GB to 16GB of RAM||a minimum of 4GB of swap space|
|16GB to 64GB of RAM||a minimum of 8GB of swap space|
|64GB to 256GB of RAM||a minimum of 16GB of swap space|
|256GB to 512GB of RAM||a minimum of 32GB of swap space|
The root partition will contains all of your data except those from /boot. I’d recommend a size of at least 10 Go for a system like fedora installed with a graphic desktop and so on.
The boot partition is where is stored all data needed to boot your OS. This is where your boot loader will go and find what it needs. This used to be something like 100Mo but i faced some issue when adding new kernels (Hugemem and so on), so i’d recommend to make it 500Mo which is nothing these days (even for a SSD) and will keep you safe in any situations.
2 Specific partition scheme
In addition to the previously exposed basic layout you may want or need a more specific scheme, here are some examples.
Just a note to tell you one thing: AVOID placing the /usr dir in a separate partition.
This directory contains most of the binary tools of your system, this is why you should not use a different partition, this might cause some lag at startup or even prevent your system from starting up.
This dir may be growing quite fast in case you are using some special software, with a lot of problems or a wide verbosity (we use to setup a 5Go /tmp part at my job)… In a classic desktop setup 50Mo or at most 100Mo will be more than enough.
SSD NOTE: In case you are using a SSD you may think about placing this part on a HDD, as it causes a lot of I/O which is not recommended to keep your SSD a long life.
In this one are stored most of variable data, such as spools, man pages, news and mail queues, database data and some softwares logs, lock and PID files. Depending on what applications you are running on your box you may face some issues regarding the size of the /var (MySQL stores by default its databases in /var/lib/mysql/).
In a server box (proxy server, mail server) this must be large, some Gigas at least.
A size of 5Go is a minimum, i would say you choose a number between 8-12Go (as seen at archlinux web site).
SSD NOTE: In case you are using a SSD you may think about placing this part on a HDD.
As a conclusion, just remember that putting everything (all dirs) under the root directory will give you serious issues as soon as you’ll get a growing dir (what ever dir it is). Partitioning is sometimes not easily handled but it is always better to have problems WHEN YOU WANT than any time (any time usually refer to the worst time!).
- How-to : Access to a nfs share from windows 7 client
- Sticky Bit, SUID and SGID : Generalities & practical examples