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
1 vote
1 answer
18 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 ...
  • 121
0 votes
0 answers
41 views

Open Source Utility to send ATA Commands from WinPE

I know there are Linux utility to sent commands to drives, like hdparm. Is there no Windows equivalent to do so? I understand it's only accessible through WinPE as per https://github.com/MicrosoftDocs/...
0 votes
1 answer
208 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 ...
  • 3
0 votes
0 answers
79 views

How to automatically turn off write cache after the kernel "hard resetting link"

I turned off write caching on an SATA drive using hdparm -W0 $DEV Now, sometimes, the kernel decides, it's a good idea to hard reset an SATA link in order to get communication to a drive back up and ...
1 vote
1 answer
666 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 ...
  • 111
0 votes
1 answer
1k 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 ...
2 votes
1 answer
341 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 ...
0 votes
1 answer
696 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 ...
  • 101
1 vote
0 answers
428 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. ...
1 vote
1 answer
1k 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 ...
  • 253
0 votes
1 answer
2k 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....
  • 279
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 ...
  • 21
2 votes
1 answer
3k 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 ...
  • 121
4 votes
0 answers
322 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 ...
  • 41
7 votes
1 answer
7k 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 ...
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 ...
  • 1,644
2 votes
1 answer
5k 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 ...
  • 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. $ ...
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 ...
  • 111
2 votes
1 answer
851 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 ...
  • 561
13 votes
3 answers
33k 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 ...
  • 131
-1 votes
1 answer
994 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 ...
  • 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 ...
5 votes
4 answers
12k 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 ...
  • 997
0 votes
2 answers
9k 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="...
  • 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 ...
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 ...
  • 2,724
14 votes
3 answers
23k 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 ...
  • 2,724
2 votes
3 answers
4k 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.
  • 49
2 votes
2 answers
672 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 ...
  • 1,669
3 votes
1 answer
336 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 ...
8 votes
2 answers
5k 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 ...
2 votes
2 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 ...
1 vote
2 answers
263 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 ...
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@...
  • 11.6k
1 vote
2 answers
1k 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 ...
  • 155
1 vote
2 answers
12k 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 ...
  • 10.8k
28 votes
6 answers
21k 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 ...
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?...
  • 1,263