Linux storage troubleshooting & incident runbooks
Storage incidents in production demand rapid, deterministic diagnosis. This hub contains battle-tested runbooks for the most critical Linux storage failures: hidden disk space leaks, emergency read-only remounts, unmount locks, and degraded RAID arrays.
Runbook 1: 100% Full disk with missing files (Unlinked open file leak)
df -h reports 100% (0 bytes free), but du -sh /* accounts for only a fraction of the disk.
Root Cause
A log rotation script or administrator deleted a massive file (e.g. rm /var/log/app.log), but the active application process (Java, Nginx, Python) still holds the open file descriptor. Linux keeps data blocks allocated until the process closes the descriptor.
Diagnosis & Non-Disruptive Remediation
# 1. Locate all open unlinked files greater than 100MB
sudo lsof +L1 / | sort -k 7 -n -r | head -n 10
# Example output:
# COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
# java 14820 app 4w REG 259,1 85899345920 0 786432 /var/log/app.log (deleted)
# 2. Reclaim the 80 GB instantly WITHOUT killing the application by truncating via procfs:
# Syntax: : > /proc/<PID>/fd/<FD>
sudo sh -c ': > /proc/14820/fd/4'
# 3. Verify disk space is immediately restored
df -h /Runbook 2: Emergency read-only filesystem remounts
Applications throw Read-only file system (EROFS); mount shows ro,relatime.
Diagnosis
# 1. Check kernel dmesg logs for hardware I/O or filesystem errors
sudo dmesg -T | grep -E -i "EXT4-fs error|XFS|I/O error|blk_update_request|aborted journal"
# 2. Check SMART health on underlying physical disk
sudo smartctl -H -A /dev/nvme0n1 # or /dev/sdaRemediation Procedure
# 1. If secondary data disk, unmount cleanly
sudo umount /srv/data
# 2. Run filesystem check and repair (for ext4):
sudo e2fsck -f -y /dev/sdb1
# For XFS filesystems:
sudo xfs_repair -v /dev/sdb1
# 3. Remount read-write and test
sudo mount -o remount,rw /srv/dataFor detailed repair strategies (including superblock recovery and dirty journal replay), see the Filesystem Repair & e2fsck Reference and the SMART Disk Health Guide.
Runbook 3: "Device or resource busy" on unmount
umount /mnt/storage fails with umount: /mnt/storage: target is busy.
Diagnosis & Resolution
# 1. Identify all processes with open files or active working directories
sudo fuser -vm /mnt/storage
# 2. Check open file descriptors specifically
sudo lsof +f -- /mnt/storage
# 3. Gracefully terminate blocking processes
sudo fuser -k -15 -m /mnt/storage
# 4. If processes refuse to die and immediate detach is required:
sudo umount -l /mnt/storage # Lazy unmountRunbook 4: Degraded software RAID & missing LVM recovery
Recovering a degraded mdadm RAID array
For full multi-disk recovery scenarios, see the mdadm Software RAID Guide:
# 1. Check array status
cat /proc/mdstat
# 2. Remove failed drive (e.g. /dev/sdb1)
sudo mdadm /dev/md0 --fail /dev/sdb1 --remove /dev/sdb1
# 3. Insert new drive, partition identically, and hot-add to rebuild
sudo mdadm /dev/md0 --add /dev/sdc1
# 4. Monitor rebuild progress
watch -n 1 'cat /proc/mdstat'Recovering LVM Volume Group with missing physical volume
For thin pool and snapshot recovery, refer to the LVM Architecture Guide:
# 1. Inspect VG status
sudo vgdisplay --partial
# 2. If physical disk is permanently lost, purge missing PV from metadata:
sudo vgreduce --removemissing --force vg_storage
# 3. Restore VG metadata from automatic backup if accidentally corrupted:
sudo vgcfgrestore -f /etc/lvm/backup/vg_storage vg_storageFrequently asked questions
Why does df report 100% disk usage while du reports the drive is almost empty?
When a log or data file is deleted (rm file.log) while an active process still holds an open file descriptor to it, the directory entry is removed but the inode and data blocks remain allocated on disk until the process closes the file descriptor. du walks directory trees and cannot see the unlinked file, while df queries the filesystem superblock which still counts the allocated blocks.
Why did my filesystem suddenly remount as Read-Only (RO)?
When a filesystem driver (ext4 or XFS) detects hardware I/O communication failures, corrupted metadata, or uncorrectable sectors, its default safety policy (errors=remount-ro) immediately remounts the filesystem read-only to prevent compounding data corruption. Inspect kernel logs with dmesg -T | grep -E "EXT4|XFS|I/O error".
What causes "umount: /mountpoint: target is busy" and how do you fix it?
A mount point cannot be unmounted if any process has its current working directory (CWD) inside the mount, has open file descriptors, or if a child mount or swap area is active. Identify blocking processes using fuser -vm /mountpoint or lsof +f -- /mountpoint.
When is it safe to use a lazy unmount (umount -l)?
umount -l /mountpoint (lazy unmount) immediately detaches the filesystem from the directory hierarchy while allowing existing processes to clean up active I/O before the underlying device is released. Use with caution: it does not immediately flush in-flight dirty writes.