Pages

11 Apr 2015

Partitioning Linux File System (Redhat, Fedora, CentOS)

Tutorial-Partition-Linux
/boot recommended size at least 500MB
The partition mounted on /boot contains the operating system kernel along with files used for the bootstrap process.

/ recommended size of 10 GB
This is where the root directory is located. The root directory is the top-level  and by default all files are written to this partition unless a different partition is mounted in the path being written to (i.e /boot or /home). 5GB root partition allows you to install a minimal installation, it is recommended to allocate at least 10GB so that you can perform a full installation, choosing all package groups.

/home recommended size up to user but normally 50GB or over
User data storage which is separate from system data, create a dedicated partition within a volume group for the /home directory. This partition should be sized accordingly on the amount of user data that will be stored locally.

swap (varies)

  • Systems with 4GB of ram or less require a minimum of 2GB of swap space 
  • Systems with 4GB to 16GB of ram require a minimum of 4GB of swap space
  • Systems with 16GB to 64GB of ram require a minimum of 8GB of swap space
  • Systems with 64GB to 256GB of ram require a minimum of 16GB of swap space

SSD Optimization

Using the btrfs file system you can optimize SSD. There are two ways this can be done.

1) The first way is mkfs.btrfs turns off meta data duplication on a single device when /sys/block/device/queue/rotational is zero for the single specified device. This is equivalent to specifying -m single on the command line. It can be overridden and duplicate meta data forced by providing the -m dup option.

Duplication is not required due to SSD firmware potentially losing both copies. This wastes space and is a performance cost.

2) The second way is through a group of SSD mount options: ssd, nossd, and ssd_spread. The ssd option does several things:

  • It allows larger metadata cluster allocation.
  • It allocates data more sequentially where possible.
  • It disables btree leaf rewriting to match key and block order.
  • It commits log fragments without batching multiple processes.
The ssd mount option only enables the ssd option. Use the nossd option to disable it.


Partition tree example using "lsblk" command.

No comments:

Post a Comment