Description: Candidates should be able to design a disk partitioning scheme for a Linux system.
Key Knowledge Areas:
- Allocate filesystems and swap space to separate partitions or disks
- Tailor the design to the intended use of the system
- Ensure the /boot partition conforms to the hardware architecture requirements for booting
- Knowledge of basic features of LVM
Terms and Utilities:
- / (root) filesystem
- /var filesystem
- /home filesystem
- /boot filesystem
- swap space
- mount points
Partitions and Devices
The operating system uses the filesystem to map files to the actual blocks on disk and manage directories and permissions.
Partitioning allows you to limit the scope of disk problems and to tune according to the intended use.
For example, you may not want to track the last time a file was looked at on system binaries and database files but track the time on users’ files. Breaking out user files onto its own partition means you can use a different set of options for user files than you use for system binaries.
When deciding how to lay out your disks, a useful acronym to remember for real-world needs is PIBS:
- Performance increases if the system’s heavy usage directory trees are put on another disk. Such as mount DB folder to a separate dick.
- Integrity improves by having critical files in their own partition. Separate FTP folder from the traditional root of the system is a good idea.
- Backup a partition with
ddtool is more efficient than using
- Security can be enhanced by using mount options to disallow direct execution of any binaries on the mounted filesystem or make all files on that partition read-only.
Logical Volume Manager (LVM)
- It is flexible to expand the space at any time.
- Any file systems can be installed and handle.
- Migration can be used to recover faulty disk.
- Restore the file system using Snapshot features to earlier stage. etc…
Commonly Used Mounts
|/home||should be NFS, share between servers|
|/var or /var/log||grow over time|
|/var/lib/mysql||DB folder, for dedicated I/O|
|/tmp||grow often, consider use high performance disk|
|/usr||3rd application folder, may share across multiple servers|