Fundamentals 9 min read

Master Linux Storage: From Disks to Mounting and Commands

This article provides a clear, step‑by‑step overview of Linux storage fundamentals, covering disk anatomy, partition management, file system structures, inode concepts, hard and soft links, mounting principles, and essential command‑line tools for managing storage on CentOS 6.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Linux Storage: From Disks to Mounting and Commands
Storage system is a very important and fundamental knowledge point in Linux, involving many concepts.

This article follows the main line: disk introduction → partition management → file system management → file storage structure → soft and hard links → mounting principle → common storage‑related command operations, giving a preliminary, clear understanding of Linux's entire storage system.

1. Disk Introduction

As we all know, the disk is the basic physical component for data storage. Now let’s dissect this basic element, see its internal structure and working principle.
Disk internal components
Disk internal components
The internal components of a hard disk include platters, magnetic heads, spindle, etc. Beyond the physical parts, there are virtual concepts that help understand the finer working principles.

For a single platter, two crucial concepts are tracks and sectors. A track is the circular path traced by the platter; a sector is the smallest physical storage unit, typically 512 bytes. For multiple platters, the same track across all platters forms a cylinder, which is the smallest unit for partitioning.

The magnetic head reads and writes data by moving back and forth over the platter surface.

2. Partition Management

After partitioning, concepts become more abstract and less directly tied to physical components. Partitions allow the head to know where data is located relative to the platter’s outer and inner edges. The smallest partition unit is a cylinder; a partition may be defined as cylinders 1 to 1000, for example.

Partition metadata is stored in the Master Boot Record (MBR) located on cylinder 0 of the disk. MBR can hold information for four partitions, typically three primary partitions plus one extended partition.

File System Management

Just as a robot needs an operating system, a disk needs a file system to be usable. Formatting a partition injects a file system that the OS can recognize; different OSes support different file systems.

Within a file system, the smallest storage unit is a block, which is a multiple of the sector size (2ⁿ × sector).

4. File Storage Structure

Taking the classic Linux ext2 file system as an example, the file system is divided into several block groups, each containing a data area and a metadata area.

The metadata area holds the inode table (file attributes and block addresses) and associated bitmap indexes for inodes and data blocks, improving lookup efficiency.

When the OS issues a read/write request, the file system uses the inode bitmap to locate the inode, then uses the block bitmap to find the actual data blocks.

Overall file system information, such as the superblock, stores global metadata about the file system.

ext2 file system layout
ext2 file system layout
Soft Links and Hard Links

With the inode concept in mind, soft and hard links become easy to understand.

Hard link: a file points to the same inode, sharing the same data blocks.

Soft link (symbolic link): a shortcut that points to the original file’s path.

Copying creates a new inode and new data blocks, increasing space usage; hard linking reuses the existing inode and blocks, so space does not increase.

6. File Mounting Principle

After the OS and file system are ready, the system needs an entry point to access the file system, which is achieved by mounting.

Mounting associates an existing directory in the root file system with an external file system, making the external system accessible through that directory.

7. Common Storage‑Related Commands

The concepts above are now applied in practice on CentOS 6 using command‑line tools.

Typical workflow: fdisk to partition the disk → kpartx to load the partition table → mkfs or mke2fs to create a file system → mount to attach the file system → blkid to view block device attributes → tune2fs to inspect file system details → dumpe2fs to display superblock and group information.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxPartitionMount
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.