hdparm is a command-line tool on Unix/Linux platforms used to adjust or inspect hard drive configuration parameters.
Questions tagged [hdparm]
39 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…
Peter Krumins
- 3,435
- 4
- 21
- 18
14
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
- 2,704
- 2
- 22
- 22
13
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
- 131
- 1
- 1
- 3
8
votes
2 answers
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
- 97
- 1
- 9
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,490
- 8
- 31
- 51
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
- 977
- 1
- 7
- 16
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
- 3
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…
Aaron C. de Bruyn
- 578
- 10
- 28
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,263
- 15
- 24
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…
9o9
- 21
- 4
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
- 1
- 3
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
- 1,634
- 6
- 29
- 51
2
votes
1 answer
How to erase a SSD to restore factory performance in Linux?
Due to big performance issues with an mdraid-1 array I'd like to pull down from the array one of the devices (Samsung 840 Pro), erase it to restore factory performance and re-add it to the array. The reason I want to do this to one of the SSDs is…
Andy B
- 105
- 2
- 8
2
votes
1 answer
Replacement raid1 drive is one block smaller. What to do?
Apparently once should always leave a bit of empty space at the end of each raid1 partition.
But if we're too late for that, what can be done if a replacement RAID1 drive is slightly smaller than the surviving drive?
Can the array be resized to be…
Bryce
- 551
- 5
- 13
2
votes
3 answers
What's a good free open source hard drive benchmark?
After a quick search on Freshmeat I found nothing. Anybody know of a good utility?
I normally use time (dd if=/dev/zero of=newfile ...) to test write speed
and hdparm -t to test read speed.
Thanks.
Stewie
- 49
- 1
- 2