Linux Storage & Filesystems: Disks, Partitions, Mounts, and Disk Usage

How Linux Stores Data, Mounts Disks, and Survives Failures.

Ask any experienced Linux administrator what causes the most production outages, and the answer is rarely CPU, memory, or networking. It’s storage.

  • Disks silently fill up.
  • Filesystems become corrupted.
  • Mount points fail.
  • Logs stop writing.
  • Databases crash.
  • Systems refuse to boot.

Storage failures are rarely loud at the start. They accumulate quietly, often unnoticed, until they trigger sudden and severe outages.

In the previous post, I covered Linux Foundations (Beginner): How Linux Really Works – Not Just Commands, focusing on the internal mechanics that power a Linux system.

Next, I explored Mastering Linux Core Operations: Users, Permissions, sudo, Packages & Services (Beginner → Intermediate), where control, access, and system structure come into focus.

I then covered Linux Processes & Networking: Monitoring, Signals, Ports, and Connectivity, shifting the focus to visibility, performance, and system stability.

This guide builds on all of those by introducing a new core principle: reliability.

You’ll learn how Linux stores data, how disks and partitions are structured, how file systems work, and most importantly, how to detect, prevent, and recover from the storage issues that bring down real-world Linux systems.

HOW LINUX SEES STORAGE (CORE CONCEPT)

Linux treats storage devices as files; everything is a file in Linux.

Disks appear as

/dev/sda
/dev/sdb

Partitions appear as

/dev/sda1
/dev/sda2

This design allows Linux to:

  • Abstract hardware
  • Support HDDs, SSDs, NVMe, USB, cloud block storage
  • Mount storage anywhere in the filesystem
  • Treat all devices consistently

Lab: List All Storage Devices

lsblk

This shows:

  • Disks
  • Partitions
  • Sizes
  • Mount points

Lab: View Detailed Disk Information

sudo fdisk -l

This is your first step in understanding how Linux sees storage.

Disks vs Partitions

Disk

A disk is the physical or virtual storage device.

Examples:

  • HDD
  • SSD
  • NVMe
  • Cloud block storage (AWS EBS, Azure Managed Disk, GCP Persistent Disk)

Partition

A partition is a logical slice of a disk.

Why partitions exist:

  • Separate OS and data
  • Improve organization
  • Enable multiple filesystems
  • Support dual‑boot setups
  • Protect system files

Lab: Identify Disks vs Partitions

lsblk -o NAME,TYPE,SIZE,MOUNTPOINT

Look for:

  • disk → physical/virtual device
  • part → partitions

Filesystems (What Makes Data Usable)

A filesystem defines:

  • How data is stored
  • How files are named
  • How permissions work
  • How metadata is tracked

Common Linux filesystems:

  • ext4 → most common, stable
  • xfs → enterprise, scalable
  • vfat → USB drives, FAT32 compatibility
  • btrfs → snapshots, advanced features

Without a filesystem, a disk is raw and unusable.

Lab: Check Filesystem Types

lsblk -f

You will learn

  • Filesystem formats

  • UUIDs (important for fstab)

Lab: Create a Filesystem (ext4)

⚠️ Only run this on a test disk, not a production system.

sudo mkfs.ext4 /dev/sdb1

This formats the partition with ext4.

Lab: Inspect Directory Sizes

du -sh /var
du -sh /home/*

You will learn

  • What consumes space

  • Why logs grow

Mounting: How Linux Accesses Storage

Linux does not use drive letters like Windows (C:, D:).

Instead, storage is mounted into the directory tree.

Example mount point:

/mnt/data

Once mounted, the disk becomes part of the filesystem.

Lab: Create a Mount Point

sudo mkdir -p /mnt/data

Lab: Mount a Partition

sudo mount /dev/sdb1 /mnt/data

You will learn

  • Manual mounting

  • Testing before persistence

Lab: Unmount Safely

sudo umount /mnt/test

You will learn

  • Why mounted disks can’t be removed

  • Avoiding data corruption

Lab: Verify Mount

df -h

You will learn

  • Filesystem usage

  • Free vs used space

  • Mount points

 

Lab: View Disk Size & Usage

df -h /
watch df -h

You will learn

  • Real-time monitoring

  • Capacity planning mindset

Lab: Understand Mount Points

mount
findmnt

You will learn

  • Active mounts

  • Filesystem types

  • Mount options

/etc/fstab: Persistent Mounts (Critical File)

/etc/fstab controls:

  • What disks mount at boot
  • Where they mount
  • With what options

A mistake here can:

❌ prevent boot ❌ cause emergency mode ❌ break services

Admins treat this file with respect.

Lab: View fstab

cat /etc/fstab

You will learn

  • Boot-time mounts

  • Why UUIDs are safer than device names

Lab: Add a Persistent Mount (Safe Method)

  1. Get the UUID:
blkid /dev/sdb1
  1. Add to /etc/fstab:
UUID=xxxx-xxxx   /mnt/data   ext4   defaults   0   2
  1. Test without rebooting:
sudo mount -a

If no errors appear, the entry is valid.

Disk Usage & Capacity (Why Systems Fail)

When disks fill up:

  • Services crash
  • Logs stop writing
  • Databases fail
  • Containers stop
  • Servers become unstable

Monitoring disk usage is a core admin responsibility.

Lab: Check Disk Usage

df -h

Lab: Find Large Files

sudo du -sh /* 2>/dev/null | sort -h

 

Lab: Check Inode Usage (Often Forgotten)

df -i

If inodes run out, you cannot create new files even if space is available.

Key Takeaway

Linux storage is simple in design but unforgiving when mismanaged.

Admins don’t wait for disks to fail; they monitor, mount carefully, and plan capacity.

This tutorial guide gives you the skills to prevent the most common cause of Linux outages.

 

Next Step: Linux Security & Hardening: Permissions, SSH, Firewalls, and System Protection

Leave a Comment

Your email address will not be published. Required fields are marked *

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners. View more
Cookies settings
Accept
Decline
Privacy & Cookie policy
Privacy & Cookies policy
Cookie name Active

Who we are

Suggested text: Our website address is: https://humbletech.cloud.

Comments

Suggested text: When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection. An anonymised string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service Privacy Policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

Suggested text: If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

Suggested text: If you leave a comment on our site you may opt in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year. If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser. When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed. If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Suggested text: Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website. These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

Suggested text: If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

Suggested text: If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognise and approve any follow-up comments automatically instead of holding them in a moderation queue. For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

Suggested text: If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where your data is sent

Suggested text: Visitor comments may be checked through an automated spam detection service.
Save settings
Scroll to Top