Skip to main content

Questions tagged [hdparm]

hdparm is a command-line tool on Unix/Linux platforms used to adjust or inspect hard drive configuration parameters.

Filter by
Sorted by
Tagged with
2 votes
2 answers
2k views

Is it normal for secure erase of an SSD to take only a couple of seconds?

Having unsuccessfully tried to use Kingston SSD Manager (KSM) on my SA400 480GB drive, I resorted to Kingston's process for Linux that uses hdparm. Unlike KSM that could not do anything because the ...
SuperAl's user avatar
  • 123
0 votes
0 answers
49 views

Disk does not spin down for unknown reasons - How to debug?

I have a setup where we need to spin down HDDs that host a zfs array for energy reasons. I use hdparm to configure apm = 24 and spindown_time = 24 for all disks. The system works as expected most of ...
fclad's user avatar
  • 11
0 votes
0 answers
343 views

HDD bricked after hdparm --sanitize-overwrite (SG_IO: bad/missing sense data)

On my HDD (WD RED Plus) I have performed SANITIZE using below command: hdparm --yes-i-know-what-i-am-doing --sanitize-overwrite-passes 1 --sanitize-overwrite hex:11111111 /dev/sda It was running fine,...
user241281's user avatar
1 vote
1 answer
330 views

Why does `hdparm -t` take so long to produce accurate results on my EC2 instance?

I'm profiling a data-processing program that I wrote and I want to understand the theoretical throughput of the machine I'm on. Specifically, I want to measure what disk read speed my g4dn EC2 ...
cade's user avatar
  • 121
1 vote
1 answer
447 views

"hdparm -s 1" on USB disk -> bricked? - USB drive is on power on in standby mode which cannot be reverted with hdparm

I have a disk which was apparently put into PUIS mode with hdparm. As the disk does not spin up on power on automatically, I think I need to send it directly to the USB device (which is not even ...
Questi's user avatar
  • 13
1 vote
1 answer
1k views

Spin up all raid drives at the same time

Here is the configuration: 4 HDDs in a RAID-5 array (mdadm) hdparm spin_down_time set for all disks Debian jessie 8.11 When the drives are in standby mode and the RAID array is requested, they wake ...
Tigger's user avatar
  • 111
1 vote
1 answer
3k views

Unlock SATA SSD locked with Dell's HDD password option in BIOS

Latest problem is a locked SATA disk. It is a Samsung 870 QVO SSD. It has been locked a long time ago with the Dell BIOS password utility. But because an admin password was set, the system never ...
Earl Hughes's user avatar
2 votes
1 answer
617 views

HDD spins up spuriously for no reason

I have four HDDs in my NAS. Three (Western Digital, all the same model) are put in standby mode (spin down) by hd-idle and they stay in standby until I use them. The reason I use hd-idle and not the ...
Lazarus535's user avatar
0 votes
1 answer
1k views

Spin down of Icy Box Raid Enclosure not working

I am running Ubuntu server 18.04 and I am using an ICY BOX IB-RD2253-U31 enclosure with two WD Black disks (no NAS disks) in RAID 1 mode (mirror). The external enclosure is connected via USB to the ...
JJ Abrams's user avatar
  • 101
1 vote
0 answers
591 views

raid not spinning down - mdadm issuing syncs?

I have an issue with an archival server that is running a RAID 5. The server is being accessed only every couple of days, so I want these disks to spin down when there is no activity for a while. ...
Philipp Unterbrunner's user avatar
1 vote
1 answer
2k views

"UNMAP not supported" error on a device that supports UNMAP

I was playing with trim/unmap commands on a Samsung SSD (MZ7WD240 model). To check the unmap support on this device i ran the following command: hdparm -I /dev/sda | grep TRIM And as expected the ...
SamTh3D3v's user avatar
  • 283
0 votes
2 answers
3k views

Why does udevadm not provide me a disk serial number when hdparm can?

Compare: root@home:~# hdparm -I /dev/sdb | grep Serial Serial Number: WCJ025C8 Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3....
Brad's user avatar
  • 289
2 votes
1 answer
1k views

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 ...
user2778214's user avatar
2 votes
1 answer
4k views

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 ...
enzian's user avatar
  • 121
4 votes
0 answers
392 views

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 ...
Hoggins's user avatar
  • 41
20 votes
3 answers
129k views

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 ...
user3016997's user avatar
7 votes
1 answer
9k views

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 ...
Jasmine Lognnes's user avatar
2 votes
1 answer
2k views

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 ...
TSG's user avatar
  • 1,852
2 votes
1 answer
6k views

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 ...
Andy B's user avatar
  • 105
1 vote
2 answers
6k views

Disk Cached IO very slow

I have two boxes with exactly same hardware configuration. Both having RAID0 (created using mdadm) over SATA disks. But I am getting different cached reads while testing using hdparm command. $ ...
pradeepchhetri's user avatar
1 vote
0 answers
4k views

Differences between hdparm --read-sector and dd with "Current Pending Sectors"

This was originally an "answer" to How to use hdparm to fix a pending sector? I'd been getting SMART notifications for the same "Current Pending Sector" for days. The dd solutions around weren't ...
bsb's user avatar
  • 111
2 votes
1 answer
922 views

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 ...
Bryce's user avatar
  • 561
15 votes
3 answers
37k views

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 ...
Nino's user avatar
  • 151
-1 votes
1 answer
1k views

linux "hdparm -B" what is a good power management value? [closed]

I run a home server with Linux (ubuntu). Data (not the os, not swap, not /home) is stored on a large software RAID5 array. The server is on 24/7, but to reduce noise I would like the raid drives to ...
Jost's user avatar
  • 31
1 vote
2 answers
2k views

Is wiper.sh working?

I'm setting up a server running Ubuntu Precise, and I'm trying to verify if SSD TRIM is working. fstrim is failing: ~ sudo fstrim -v / fstrim: /: FITRIM ioctl failed: Operation not supported So I ...
Aleksander Blomskøld's user avatar
5 votes
4 answers
14k views

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 ...
chmac's user avatar
  • 1,047
0 votes
2 answers
11k views

how to know what is disk uuid for md raid1 and hdparm?

ive got md0 (raid 1) array and want to make write cache off on them during system boot (ubuntu 12.04 server). md0: /dev/sda /dev/sdc blkid: /dev/sda: UUID="3e502de5-696d-f4b4-470e-XXX" TYPE="...
MealstroM's user avatar
  • 1,517
1 vote
1 answer
1k views

Is it possible to get hdparm to report the current level of performance degradation on my SSD?

I work on a product that is a headless Debian Linux system with removable Intel X-25M solid state drives. Recently we noticed that the read/write performance of these drives degrades over time, and ...
Jeremy Friesner's user avatar
0 votes
1 answer
1k views

Disk is spinning down each minute, unable to disable it

I played with spindown and APM settings of my Samsung discs and now they spin down every minute. I want to disable it, but it seems it does not accept any of the spindown time or APM values. Nothing ...
lzap's user avatar
  • 3,020
15 votes
3 answers
25k views

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 ...
lzap's user avatar
  • 3,020
2 votes
3 answers
5k views

What's a good free open source hard drive benchmark? [closed]

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's user avatar
  • 49
2 votes
2 answers
684 views

Linux Disk tuning help

I have a Software RAID1 disk that is randomly experiencing very slow read times. hdparm -t /dev/md0 /dev/md0: Timing buffered disk reads: 2 MB in 12.43 seconds = 164.80 kB/sec It appears to be ...
John P's user avatar
  • 1,689
3 votes
1 answer
362 views

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 ...
user avatar
10 votes
1 answer
6k views

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 ...
Bryan Austin's user avatar
4 votes
4 answers
3k views

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 ...
Vito Botta's user avatar
1 vote
2 answers
266 views

Measuring disk performance for random seeks?

I'm setting up a server that involves lots of database writing during regular updates, and I have wildly varying results between different machines. I'm trying to find out what I can expect from ...
gravitystorm's user avatar
2 votes
2 answers
3k views

How can I test hd performance on an OpenVZ container?

CentOS 5.x | VPS | OpenVZ I'm trying out a vps that uses OpenVZ and am not sure what command to type to measure disk read performance. I thought hdparm would work but I get the following: [root@...
Mike B's user avatar
  • 12.1k
1 vote
2 answers
2k views

Hdparm slow server

My web site server is very slow and I contacted my hosting company. This company ask me to execute this command line: hdparm -tT /dev/sda The result is here: /dev/sda: Timing cached reads: 1112 ...
Kiva's user avatar
  • 155
1 vote
2 answers
13k views

Ubuntu seems to ignore spindown_time in config /etc/hdparm.conf

I have /etc/hdparm.conf configured to power down the external USB HDD, but it actually never spins down. When I manually turn it off (hdparm -Y or set its spindown hdparm -S 36) - everything works as ...
kolypto's user avatar
  • 11.3k
28 votes
6 answers
23k views

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 ...
user avatar
3 votes
1 answer
4k views

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?...
cmcginty's user avatar
  • 1,311