Managing Linux Storage Devices
Full-Access Members Only
Sorry, this lesson is only available to Server Academy Full-Access members. Become a Full-Access member now and get instant access to this and many more premium courses. Click the button below and get instant access now.
There are no resources for this lesson.
Device Files in /dev
In Linux, storage drives are represented as files within the
/dev directory. For example, the first drive is typically
/dev/sda, and its first partition is
Persistent Naming in /dev/disk
/dev/disk directory provides more persistent ways to identify disks and partitions, using symbolic links that point to the correct device files. These include:
- by-label: Uses user-specified names for identification.
- by-uuid: Utilizes universally unique identifiers.
- by-partlabel and by-partuuid: For GPT-specific labels and UUIDs.
- by-id: Based on hardware serial numbers.
- by-path: Depends on the device's connection to the system.
For persistent identification,
by-uuid are often the best choices.
Mounting Block Devices
To use a filesystem, it must be mounted, or attached, to the existing directory tree of the Linux system. This is done by linking a formatted partition or drive to a directory, after which the drive's contents become accessible from that location.
Recommended Mount Points
- Temporary filesystems: Use
/mntor its subdirectories.
- Permanent storage: No standard recommendation, but
/mntor its subdirectories are commonly used.
Making Mounts Permanent with /etc/fstab
/etc/fstab file is used to define filesystems that should be automatically mounted at boot. Each line in this file specifies a different filesystem, its mount point, format, and mount options.
Server Academy Members Only
Sorry, this lesson is only available to Server Academy Full Access members. Become a Full-Access Member now and you’ll get instant access to all of our courses.