hdparm is a command-line tool on Unix/Linux platforms used to adjust or inspect hard drive configuration parameters.
Questions tagged [hdparm]
45 questions
28
votes
6 answers
What's the effect of standby (spindown) mode on modern hard drives?
I just assembled a new Linux file server with several Samsung HD103UJ 1TB hard drives and I am currently optimizing it.
The question I can't find an answer to is: is it reasonable to set a spindown timeout (with hdparm -S) for the drives? Can the…
user3903
21
votes
3 answers
How to unlock an SSD disk with hdparm?
I have an SSD disk with password protection, but the password was lost long time ago... so I tried to erase the ATA security with the hdparm command.
With "hdparm -I", the disk information looks interesting as below:
root@ubuntu:~# hdparm -I…
user3016997
- 313
16
votes
3 answers
How to determine disc spindown time
I am able to set both APM and spindown times using the command:
hdparm -S 246 -B 128 /dev/sda
Unfortunately I can only find the APM value in the information output:
hdparm -I /dev/sda | grep Advanced
How can I see the spindown time value? I…
lzap
- 3,190
- 2
- 25
- 23
15
votes
3 answers
How to use hdparm to fix a pending sector?
SMART is stating one pending sector on of my server's hdd. I've read lot's of articles recommending using hdparm to "easily" force the disk to relocated the bad sector, but I can't find the correct way to use it.
Some info from my "smartctl":
Error…
Nino
- 151
11
votes
1 answer
Hdparm poweron_standby is how dangerous?
jacks@Gen4:~$ sudo hdparm -s 1 -S 4 /dev/sdb
/dev/sdb:
Use of -s1 is VERY DANGEROUS.
This requires BIOS and kernel support to recognize/boot the drive.
Please supply the --yes-i-know-what-i-am-doing flag if you really want this.
Program…
Bryan Austin
- 137
7
votes
1 answer
How to send "ATA Secure Erase" command to SSD?
A very good way to erase a SSD which have SED support is to change the password/key. But what to do with those that doesn't have SED support?
This article says
Fortunately it is possible to erase most SSDs, though this is closer
to a “reset” than…
Jasmine Lognnes
- 2,670
5
votes
4 answers
How can I unfreeze an SSD connected to a remote server?
I don't have physical access to the machine, so I can't unplug the drive.
# hdparm -I /dev/sda | grep frozen
frozen
The advice I've read elsewhere is to hotplug the drive, pull the power / sata cables while the machine is running. Those…
chmac
- 1,057
4
votes
0 answers
Bad sector on disk, part of a LVM over RAID1 array, which files are affected?
My RAID1 array /dev/md1 is rebuilding after one of the disks has been replaced.
Problem : the source disk has Unrecoverable Errors, and my only choice if I do not want to lose the whole data set (no backup, no excuse) is to patiently write to the…
Hoggins
- 41
4
votes
4 answers
Benchmarking hard disks on Mac OS X SL
On Linux I would usually use "hdparm -tT device" when I want a quick idea of how an hard drive is performing compared to another; having switched to Mac OS X a few months back I have yet to find something similar and as easy to use.
I have read that…
Vito Botta
- 377
3
votes
1 answer
Set device offset in Linux due to failed hardware RAID?
I have a failed hardware RAID card. This card had two drives in a RAID-1 mirror. Plugging one of the drives into the motherboard shows no partition table. Using a program like testdisk, I can see the partition table starts 32 blocks into the…
user18668
3
votes
1 answer
Toshiba HDD: How to change logical sector size to 4096 byte?
OS: Debian 12 (Bookworm)
HDD: TOSHIBA MG10AFA22TE (SATA)
Firmware Revision: 0102
I've tried to change logical sector size of multiple HDDs, but it doesn't work:
hdparm --set-sector-size 4096 --please-destroy-my-drive /dev/sdX
changing sector size…
killerbees19
- 31
3
votes
1 answer
Where Does Ubuntu Execute Hdparm.conf Settings
I'm looking for some info about the hdparm.conf file in Ubuntu (Jaunty). I have added some settings in there and would like to "run" them.
How can I execute the hdparm.conf file from the command line?
What start-up script in Ubuntu restores the…
cmcginty
- 1,359
2
votes
1 answer
How to undelete a moved file on Linux
I accidentally moved a file onto an existing file and need to recover the old file.
original file: /mnt/FILE (was around 1 GB)
new file: /mnt/FILE (now is 17 bytes)
command:
mv SOMEFILE /mnt/FILE
First I have unmounted the filesystem the file…
user2778214
- 21
2
votes
1 answer
hdparm unlock ssd with correct password encoding
I have an old password protected SSD connected via USB to my Linux System. I'm trying to unlock it with hdparm.
Problem is my password was ./perspective (it doesn't matter now because I only used it for the SSD and nowhere else) and I think because…
enzian
- 121
2
votes
1 answer
hdparm serial number is garbage
I'm trying to read the model and serial number from a drive using "hdparm -I /dev/sda" and I find on some systems (eg: VMware virtual machines) the serial number and model often return garbage (see below). And the garbage seems to change over time…
TSG
- 2,014
- 8
- 41
- 66