Questions tagged [hdparm]

A command line program to set and view parameters and test performance of storage devices.

hdparm is a command line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS "libata" subsystem and the older IDE driver subsystem.

Warning: Using hdparm incorrectly can cause major data corruption and data loss.

In Ubuntu, executing hdparm requires root permission, so it should normally be run with sudo.

More information:

  • hdparm on Ubuntu Manpages
  • ATA Secure Erase on ata Wiki (how to use the hdparm command to issue a Secure Erase ATA instruction to a target storage device)
  • DMA on Ubuntu Community Help Wiki (some information about hdparm related to DMA or Direct Memory Access)
39 questions
4
votes
3 answers

secure erase with hdparm - can still see file content

I downloaded latest stable Ubuntu (ubuntu-16.04.3-desktop-amd64.iso image that I double checked for authenticity) and used it to boot my new Win10 system which I wanted to wipe. I followed the instructions, like those…
Justin
  • 81
3
votes
1 answer

What is so dangerous about --trim-sector-ranges?

I have an SSD that I want to TRIM before installing Ubuntu on it. It has been suggested to me, that I leave some unpartitioned space, such that the wear leveling will have free blocks to work with. However I understand that because the drive has…
kasperd
  • 1,779
3
votes
1 answer

Equivalent of hdparm -t for home directory?

I want to test the read speed on an Ubuntu Server hard drive like one would do with hdparm -t, but I need to automatically this on multiple machines where I don't know beforehand what dev the main HDD is, so I can't just hdparm -t /dev/sda. I would…
Jim
  • 33
2
votes
1 answer

My pc says it reads 4633MB/s from SSD drive cache over SATA 6Gb/s, how is that possible?

I got this number using: jdoe@jdoe:~$ sudo hdparm -tT /dev/sda /dev/sda: Timing cached reads: 9260 MB in 2.00 seconds = 4633.30 MB/sec Timing buffered disk reads: 978 MB in 3.00 seconds = 325.77 MB/sec The SSD is a Samsung 850EVO with SATA…
Mads Skjern
  • 1,058
  • 4
  • 13
  • 24
2
votes
1 answer

ATA Secure Erase - password set - not locked

Today I tried to wipe my ssd using ATA Secure Erase (with an Ubuntu live sytem). I basically followed the description here: What is the recommended way to empty a SSD? However, I think I made a mistake during the password setting. Setting the…
Max1
  • 121
2
votes
0 answers

How to automaticaly power off hdd

I have laptop with two hard drives. First is SSD (with system) and the second is HDD with my private files. So I would like to setup to automatically power off of disk after 4 minutes. I set hdparm -S 48. It didn't work. So I set hdparm -B. If I set…
Dave
  • 21
2
votes
0 answers

What's the difference between hdparm APM and spindown?

When I check hdparm man page, I see two options which looks similar to reduce power usage by hard drive. One is -B which sets APM (Advanced Power Management) and other one is -S which is the standby (spindown) timeout for the drive. What exactly is…
2
votes
1 answer

hdparm.conf has no effect in 20.04

I recently did a clean install of 20.04 on my server. In 18.04, I could spin down my mechanical drive with this line in hdparm.conf: /dev/sda { spindown_time = 25 } Now, the config file doesn't appear to have any effect. I can still set the…
2
votes
0 answers

gnome-disk-utility or hdparm to spin down hdd permanently → issues

I used to use this hdparm -Y /dev/sda under KDE to spin down hdd disk but this stopped to work as disk started to spin up by itself, I couldn't find a way to correct this by using other hdparm parameters and afrer a wide research found that still…
PawełG
  • 182
1
vote
2 answers

How to wipe existing SSD prior to fresh Ubuntu install?

I'm running Ubuntu Server 16.04 LTS on a system with a single drive, an SSD. When 18.04 releases in April, I intend to do a fresh install using a USB installer. I'd like to safely wipe the SSD prior to doing so, but am unfamiliar with how to do so…
Jamie S
  • 141
1
vote
1 answer

hdparm spin down time not persisting between reboots

If enter the following commands on the command line it works as expected and spins down in the specified time. sudo hdparm -S 120 /dev/sda sudo hdparm -S 120 /dev/sdb Putting this in /etc/hdparm.conf does nothing however. The disks just stay spun…
Geo R
  • 43
1
vote
1 answer

HDPARM - Secure erase SSD over pxe boot

I have been using hdparm fine for ssd's by booting a live debian or ubuntu from usb. Even if the device is frozen, sleeping the computer works fine because the os was loaded from usb. But what if i am pxe grub booting ubuntu or debian, and i need to…
philthy
  • 253
1
vote
3 answers

Is there a way to make a hdparm setting "stick" over boots AND suspend/resumes?

I have a system here where I set a an idle (low-power) timeout for one hard-drive, as it is not used that much. For this, I have the command hdparm -S6 /dev/sdc in /etc/rc.local. However, I've found that this works well over boots, but when I send…
isync
  • 664
1
vote
2 answers

secure erase returns input/output error

I've already given a detailed description of my predicament in my previous question. Now I've got this: sudo hdparm --user-master u --security-erase my_password /dev/sda returns: security_password: "my_password" /dev/sda: Issuing…
m.a.a.
  • 645
1
vote
3 answers

Problems restoring damaged sectors on hdd

I have some problems with my laptop hdd, due to a lack of electricity during a critical update. Since then, I have been able to reboot with little to no further issues, but recently, possibly due to another major update or something worsening with…
Ajna
  • 13
1
2 3