Site icon New Generation Enterprise Linux

Stop worrying about the actual health of your hardware

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

Stop worrying about the actual health of your hardware

🧩 The Challenge

You look at lsblk and see a disk, but you have no idea if that drive is secretly dying behind the scenes. I once spent three days chasing random data corruption only to realize the disk controller was reporting errors the OS just wasn’t shouting about.

šŸ’” The Fix

Use smartctl to pull the raw health data directly from the drive firmware. It saves you from guessing if that weird IO hang is a cable issue or a drive heading for the silicon graveyard.

smartctl -a /dev/sda | grep -E 'SMART overall|Reallocated_Sector_Ct|Current_Pending_Sector'

āš™ļø Why It Works

By grabbing these specific attributes, you’re looking at the drive’s internal counters for bad sectors that have already been swapped out or are waiting for a write attempt to finalize their failure.

šŸš€ Pro-Tip: Alias this to something like ā€˜check-disk’ so you actually run it before pulling your hair out during a production outage.

Linux Tips & Tricks | Ā© ngelinux.com | 9/27/2026

0 0 votes
Article Rating
Exit mobile version