Stop your thin-provisioned SSDs from going stale

Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)

Stop your thin-provisioned SSDs from going stale

🧩 The Challenge

Everyone thinks an SSD is just a fast disk, but after a year of heavy writes, performance tanks because the drive doesn’t know which blocks are actually empty anymore. It’s painful watching a modern server crawl just because the underlying storage has no clue what’s been deleted by the OS.

💡 The Fix

Use fstrim to tell the SSD controller which blocks are free and ready for garbage collection. It’s the easiest way to keep your storage snappy without having to reboot or move data around.

sudo fstrim -av

⚙️ Why It Works

This command issues an ioctl to the filesystem that maps out all the unused blocks and sends a discard command to the SSD controller. Think of it as spring cleaning for your NAND cells, letting the drive manage its wear-leveling cycles way more effectively.

🚀 Pro-Tip: Stick this in your daily cron or rely on the systemd timer that usually ships with your distro; don’t just run it once and forget it exists.

Linux Tips & Tricks | © ngelinux.com | 10/26/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted