hdparm - Sorage Device Configuration Tool

Official Website: hdparm

hdparm is a powerful and open source storage device configuration tool under Unix/Linux system. Here are the parameters I frequently used.

  • Identify Devicehdparm -I /dev/sdb
  • SecureErase hdparm --user-master u --security-set-pass p /dev/sdb
    hdparm --user-master u --security-erase p /dev/sdb
    hdparm --user-master u --security-unlock p /dev/sdb
    hdparm --user-master u --security-disable p /dev/sdb
  • Set Maximum Sector (84GB / 128GB)hdparm -N p164115504 --yes-i-know-what-i-am-doing /dev/sdb

To pursue higher performance, storage device might implement data caching (store in the internal DRAM). However, it might have the risk of data loss, especially when a power failure occurred. For data protection purpose, we could disable write cache to prevent data loss disaster. Here are the steps for disabling write cache.
Disable Write Cache(Assume your device mounted on /dev/sdb) hdparm -W 0 /dev/sdb Enable Write Cache hdparm -W 1 /dev/sdb Once you disable the write cache, the performance will drop sharply!!!

No comments:

Post a Comment

Orange - data analysis tool

Installation pip install orange3 Run orange python -m Orange.canvas