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.
Instructions
Q&A (0)
Notes (0)
Resources (0)
Saving Progress...
Resources
There are no resources for this lesson.
Notes can be saved and accessed anywhere in the course. They also double as bookmarks so you can quickly review important lesson material.
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 /dev/sda1
.
Persistent Naming in /dev/disk
The /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-label
or 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
/mnt
or its subdirectories. - Permanent storage: No standard recommendation, but
/mnt
or its subdirectories are commonly used.
Making Mounts Permanent with /etc/fstab
The /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.