Mohamed Sharaf

How old is that server disk? Check its power-on hours

Read a drive’s real age from its SMART data with smartctl, and turn the hours into days.

· 1 min read

From the archive: first published on mohamedsharaf.net in December 2018. Rewritten and checked in 2026; some details may be out of date.

A server’s purchase date doesn’t tell you how long its disks have actually been spinning. The drive keeps that number itself, in its SMART data. With smartmontools installed:

smartctl -A /dev/sda | grep Power_On_Hours
smartctl -A /dev/sdb | grep Power_On_Hours

Point it at the disk (/dev/sda), not a partition (/dev/sda1). The last number on the line is the hours. Divide by 24 for days: 2,620 hours is about 109 days; 43,800 hours is about five years.

While you’re there, look at Reallocated_Sector_Ct and Current_Pending_Sector too. If those start climbing, plan the replacement now, not after the failure. (For NVMe drives, use smartctl -a /dev/nvme0 and read “Power On Hours”.)

ShareWhatsAppLinkedInXTelegramFacebook