Devices, Linux Filesystems, and the Filesystem Hierarchy Standard
Objective 1: Create Partitions and Filesystems
Disk drives and partitions
IDE disks are known as /dev/hda, /dev/hdb, /dev/hdc, /dev/hdd, and so on.
SCSI disks are known as /dev/sda, /dev/sdb, /dev/sdc, and so on.
Three types of partitions:
- Primary
Filesystem container. At least one must exist, and up to four can exist on a single physical disk. They are identified with numbers 1 to 4, such as /dev/hda1, /dev/hda2, and so on.
- Extended
A variant of a primary partition, but it cannot contain a filesystem. Instead, it contains one or more logical partitions. Only one extended partition may exist, and it takes one of the four possible spots for primary partitions.
- Logical
Created within the extended partition. From 1 to 12 logical partitions may be created. They are numbered from 5 to 16, such as /dev/hda5, /dev/hda6, and so on.
Up to 15 partitions with filesystems may exist on a single physical disk.
The root filesystem and mount points
The top of the filesystem tree is occupied by the root filesystem. Other filesystems are mounted under it, creating a unified filesystem.
/etc, /lib, /bin, /sbin, and /dev must be part of the root filesystem.
Partition and filesystem management commands
The following commands are commonly used to repair and manage filesystems:
-
fdisk [
device
] Manipulate or display the partition table for
device
using a command-driven interactive text interface.device
is a physical disk such as /dev/hda, not a ...
Get LPI Linux Certification in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.