How to Check Hard Drive Information and Power-On Hours on Linux Dedicated Servers

linux server hard drive infosmartmontools power on hourscheck used server HDDWestern Digital Black specscheap dedicated server tips
Published·Modified·

A few days ago, Psychz had a Christmas promotion: an E3-1230 v2 server with 16GB RAM and a 2TB hard drive for just $24/month. I couldn't resist and made the purchase. Cheap dedicated servers abroad are usually built with second-hand hardware, like those from Online or Kimsufi. The quality of the machines you get is largely a matter of luck. Hard drive conditions vary widely, and it's possible to receive a drive with 100,000 hours of power-on time. The first step after setting up the server is to check the hard drive information.

Server Setup

Install smartmontools

You need the smartmontools utility to check hard drive information. Install it using the following commands:

# Debian or Ubuntu
apt -y install smartmontools
# CentOS
yum -y install smartmontools

Check Hard Drive Information

Run fdisk -l to see that there are two disks: /dev/sdb and /dev/sda, as shown below:

Disk List

Run smartctl --all /dev/sda to print all information for one of the hard drives (some parts have been removed for display purposes):

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Black
Device Model:     WDC WD1003FZEX-00MK2A0
Serial Number:    WD-WCC3F2792309
LU WWN Device Id: 5 0014ee 2b49129b7
Firmware Version: 01.01A01
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       9
  3 Spin_Up_Time            0x0027   174   174   021    Pre-fail  Always       -       2266
  9 Power_On_Hours          0x0032   033   032   000    Old_age   Always       -       49628
  • Model Family: Brand name, in this case, Western Digital Black.
  • Device Model: Hard drive model.
  • Rotation Rate: Hard drive speed.
  • SATA Version is: SATA interface version.
  • Power_On_Hours: Power-on time, which is 49,628 hours in this example, approaching 50,000 hours.

Different hard drive models have different performance levels. The longer the power-on time, the shorter the potential lifespan. My luck was average; the drive I received was a Western Digital Black with 50,000 hours of power-on time. This shows that buying cheap dedicated servers is largely a matter of luck.

Some Suggestions

If you do not use RAID 1 for your dedicated server, data security is lower than that of a VPS. It is recommended to develop the habit of regular backups to avoid data loss.