Most Linux installation wizards offer the feature of automatic allocation of storage resources as discovered on a system. Alternatively, the user may opt to manually configure disk partitioning layouts. In this example, the boot mount is on a separate drive from root and swap locations. Since this boot directory would rarely be updated, it doesn’t require as much storage space nor write performance. The main idea is to use a hard drive that has fast reading speed for expedient boot time. Here is an example setup with two physical hard drives:
SATA 16GiB:
–SDA, GPT partitioning, Fat32, mount point /boot/efi (with boot, boot-efi flags).
SATA 1TB:
–SDB1, GPT partitioning, ext4, mount point /, 936GiB
–SDB2, swap, linuxswap, 64GiB
Notice that the illustration above doesn’t account for the /home, /opt, /etc directories as often mentioned in other guides. The logic here is that root (/) encompasses all folders. Yes, it is recommended that the /home silo be set on a different partition to prevent users from over utilizing it to the point of depleting storage resources that could be required for system files. However, if the Linux machine is meant to serve with roles such as file server, web server, etc., users home folders will not be of major concerns.
The other item is linuxswap. That is necessary to enable hibernation. Although servers may not go into sleep mode, this would still be beneficial to ensure overall computer performance. As a minor point, solid state drives, that are common nowadays, would last longer when being underutilized.
Please note that the example above is overly simplistic. Server class machines may benefit from Logical Volume Manager (LVM) technology. As of the time of this writing, a fresh install of Lubuntu/Ubuntu using LVM can wast a lot of time in troubleshooting efforts. Fortunately, Redhat/CentOS setup would default to LVM without the extra head-aches. Further reading is available in this other post: https://blog.kimconnect.com/logical-volume-manager-lvm-in-red-hat. While we’re still on this page, here’s a some working example:
Disk 1:
- Disk partitioning: GPT
- Name: /dev/sda1
- Size: 600MB Fat32
- Mount: /boot/efi
- Flag: boot, boot-efi
- Name: /dev/sda2
- Size: all Leftover disk space
- File System: LVM PV => LVM1 Group Member
- Flag: none
Disk 2:
- Disk partitioning table: GPT
- Name: dev/sdb1
- Size: wholeDisk GB => LVM1 Group Member
- Flag: none
LVM1:
- Disk format: VMD
- Volume 1:
- Mount: /swap
- Size: matchAvailable RAM
- Flag: linuxswap
- Volume 2:
- Mount: root (/)
- Size: allLeftOver GB
- Format: ext4
- Flag: none