Your hard drive is one of the most important components of your server. Whether you have one single drive or several linked together, It is crucial for you to keep them at optimal performance and speed. There are many tools that can help you manage your drives, and hdparm is just one of them.
The first thing you should do is make sure you are operating as the root (administrator) user. From a secure shell (SSH) or console type:
Then, enter your password when prompted and press Enter.
To get general information about your disk, type;
hdparm -i /dev/sda
Replace “sda” with the actual device name for your drive. If you are not sure what the device name is, type:
Next, you can perform a read speed test to find out how fast data is read from your drive:
hdparm -tT /dev/sda
The output will look something like this:
Timing cached reads: 2090 MB in 2.00 seconds = 1045.50 MB/sec
Timing buffered disk reads: 180 MB in 3.00 seconds = 59.98 MB/sec
There are many other things you can do with hdparm, including adjusting some settings on your hard drives. As with anything involving devices related to your data, it is a good idea to backup your files before you start fiddling around with anything. For a comprehensive guide on hdparm, visit this wiki site.