Questions tagged [hdparm]
The hdparm tag has no usage guidance.
75
questions
0
votes
0
answers
63
views
hdparm disk spin-down not working anymore
My setup: Raspberry 4 / Raspberry OS; additional 3TB WD HDD attached via USB3
I was using hdparm to spin down this harddisk after 3o min.
This was working perfectly fine until few days ago.
Now, there ...
0
votes
1
answer
65
views
dd faster than it should be
When I run the command dd if=/dev/zero of=tmp.dat bs=1M count=1024 status=progress on a 500G HDD I get
833617920 bytes (834 MB, 795 MiB) copied, 1 s, 829 MB/s
1024+0 records in
1024+0 records out
...
1
vote
1
answer
50
views
Identifying the sources of mysterious IO that prevent ZFS disks from spinning down
I have a Debian system with an SSD as the primary drive and two spinning disks for bulk storage configured with a single mirrored vdev (and a single partition within it).
Those disks are loud, so I'd ...
0
votes
0
answers
20
views
How to restore (normalize) HDD spinoff timeout in LXLE?
After the last update on my system, the timeout setting for turning off the hard disk was broken.
This problem manifests itself as a constant shutdown and spinning of the HDD motor at intervals of ...
1
vote
0
answers
85
views
hdparm secure erase with progress updates?
Does anyone know of a clever way to receive any sort of progress status updates using hdparm secure erase?
Ideally the end result would be something like dd's status=progress attribute.
1
vote
1
answer
176
views
Why is setting device read-only flag dangerous in hdparm?
In the hdparm man page the -r option is not mentioned as being dangerous but in the help list of options shown with -h it says:
-r Get/set device readonly flag (DANGEROUS to set)
Is there a reason ...
0
votes
1
answer
300
views
How to truly disable the write cache function(in dmesg) in Ubuntu for an external HDD?
I use sudo hdparm -W 0 /dev/sdb to disable the write cache for the HDD,
and the information /dev/sdb: write-caching = 0 (off)
shows that the write cache is truly off.
But when I use the instruction ...
2
votes
2
answers
2k
views
Does hdparm have an option to test the write speed?
hdparm -t [device]
tells me the read speed. Is there a way to show the write speed? When I man hdarm | grep write I get flags -F, -n, -r and -W, all which do not provide the desired result I am ...
0
votes
0
answers
473
views
SSD very slow copying files
I'm running Debian 10, and I have 3 SSDs, one of which is an m.2 (nvme), and I'm facing a strange issue when copying files between two internal SSDs, or even inside the same SSD: the copy (r/w) speed ...
1
vote
0
answers
618
views
Show current standby value from hdparm
hdparm allows me to set the time before the disk went to standby using the -S <value> flag. But how can I set what value is currently configured for standby?
I tried
# hdparm /dev/sda
/dev/...
0
votes
2
answers
710
views
WD HDD wokes up seconds after being set to standby
I have a ZFS raid with two disks. The homeserver is running 24/7 and the disks too. So I'd like to set them to standby after some idle time. Several posts recommend to test this with the -C param
# ...
1
vote
1
answer
792
views
unfreeze SSD disk when kernel does not support "suspend"
I need to secure erase SSD disk with hdparm on my server:
hdparm --user-master u --security-erase NULL /dev/sda
but the disk is currently "frozen", as reported by hdparm:
hdparm -I /dev/sda | grep ...
0
votes
0
answers
234
views
Udev rule is not applied
I have a simple udev rule on ubuntu 19.10
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", RUN+="/sbin/hdparm -B 127 -S 120 /dev/%k"
I have 2 drives which this can be applied to
...
3
votes
1
answer
595
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).
I want to put the two disks in sleep mode / spin ...
1
vote
2
answers
606
views
hdparm succeeds reading sector but cp does not
I have a drive where I want to copy data from but cp fails every time and prints:
cp: error reading 'path/to/always/same/file': Input/output error
The output of dmesg contains:
[72481.869510] ata2....
3
votes
2
answers
2k
views
In Linux, is there a way to keep whole drives offline?
I am looking for a feature similar to the ability to set a drive offline in Windows Disk Management:
The problem is that I don't know exactly what Windows is doing there. But it seems to affect the ...
0
votes
2
answers
994
views
Slow disk write speed
i installed new debian 9.8 server for DB application.it has two disk and running on vCenter 6.0.
First write disk write speed 100-120 Mb/sec suddenly after for while disk write speed decrease ...
3
votes
2
answers
4k
views
“hdparm -S” does not work on external HDD's. How to avoid it from spinning down?
Apparently, hdparm only works with internal HDD's.How do I avoid an external HDD from spinning down after half a minute?
One way is to read one sector using badblocks or dd each 29 seconds in an ...
3
votes
1
answer
12k
views
Why is secure erase not working? SG_IO: bad/missing sense data
I want to securely erase my SSD(on Ubuntu 18.04)
I do
sudo time hdparm --user-master u --security-erase mypassword /dev/sda
I get this error-message
/dev/sda:
Issuing SECURITY_ERASE command, ...
0
votes
1
answer
162
views
hdparm: What does -n do without a parameter?
The full command I executed in a live CD:
sudo hdparm -n /dev/sda
What would be the effect of running the command without a parameter? Did the command change anything?
The hdparm man page says, ...
2
votes
1
answer
174
views
Linux specific problem with Write Protected Compact Flash
I am having a version strange problem with a 4GB ATP Industrial Grade Compact Flash Card. I am trying to use it as the boot storage for a ALIX single board PC.
When I insert it into another Linux ...
2
votes
1
answer
210
views
Why does ATA Secure Erase occur concurrently rather than in parallel with PATA drives?
When issuing the ATA secure erase command via hdparm against multiple SATA (non-SSD) drives it occurs in parallel.
However when the same command is issued against PATA drives, it occurs ...
1
vote
0
answers
217
views
Why does hdparm return 2 differing results when AHCI is enabled and disabled?
When invoking the hdparm command to securely erase devices e.g. ATA SECURE ERASE, the output hdparm -I /dev/sda and hdparm -I /dev/sdb differ with AHCI enabled and disabled.
Both devices are SATA ...
0
votes
1
answer
952
views
Why does hdparm -y not spin down a HDD while the file managed does? (using Ejection option)
A HDD, which is older than 10 years, is getting read using a SATA-to-USB adapter.
When using sudo hdparm -y /dev/sdj, the HDD does not shut down.
But when using the Eject option in the File Manager, ...
2
votes
2
answers
2k
views
sedutils vs hpdarm for SED hard disks
According to my reading there are 2 known methods for using Self-Encrypting Drives (SED):
hdparm
https://www.pugetsystems.com/labs/articles/Introduction-to-Self-Encrypting-Drives-SED-557/
sedutils
...
9
votes
1
answer
11k
views
List features of NVMe drive (like hdparm -I for non-NVME)
With a non-NVMe drive, I can run:
# hdparm -I /dev/whatever | grep TRIM
Data Set Management TRIM supported (limit 8 block)
Deterministic read data after TRIM
With a Samsung 960 EVO 1TB NVMe drive (...
0
votes
0
answers
54
views
Power management for old laptop running Linux
Recently I went through boxes of old stuff and discovered a few very old laptops (early 2000's) full of dust. Instead of throwing them away I decided to install a very light system SparkyLinux onto ...
3
votes
0
answers
194
views
What does hdparm mean by "buffer cache"; hardware cache in hard drive or page cache in computer memory?
From hdparm man page:
-t Perform timings of device reads for benchmark and comparison
purposes. For meaningful results, this operation should be
repeated 2-3 times on an ...
1
vote
1
answer
319
views
hard disk high temperature and frequent access while idle
I have bought two WD Gold 4TB and installed debian sid with kde on a single RAID1 partition, md0:
# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5]
[raid4] [...
1
vote
0
answers
519
views
Can hdparm security-set-pass brick an SSD
I wanted to secure erase my old Kingston SH100S3/120G SSD. I tried to follow the article here.
I checked the SSD with hdparm -I /dev/sda command. Since it showed "frozen" security state even after ...
3
votes
0
answers
175
views
zfs pool not available on boot after setting noatime and drive idle times with hd-idle / hdparm
At first, I set up my RHEL7-x64 to sleep the zfs drives using this,this, and this. I believe I tried hd-idle first, when the problems began.
I had written a script idle_drives_enable to handle ...
0
votes
1
answer
829
views
Is it safe to run hdparm -y on lvm
I've got a lvm volume, which is composed of two hard drives enclosed in external enclosure connected through usb.
As it's external and not used too much, I like to spin it down if it is not used.
I'...
0
votes
2
answers
4k
views
Where is SG_IO sense data stored?
I'm getting the following error message when running hdparm -S on my external USB hard drive:
SG_IO: bad/missing sense data
Where is this sense data stored on the hard drive? I never encountered ...
4
votes
1
answer
7k
views
HDD idle settings using hdparm (APM, Suspend)
OS: GNU/Linux Debian 9.2
I want to change my computers behavior to suspend HDDs when idle for 30 minutes.
So far I have found out I need to change APM level to allow suspending disks by setting:
...
1
vote
1
answer
730
views
Is it safe to power off disk after hdparm spin-down?
I have heard that it is generally considered unsafe to power off a mounted hard disk; the consequences could be a lost or unresponsive drive. However, powering off a drive after unmounting should be ...
5
votes
2
answers
3k
views
Why cached reads are slower than disk reads in hdparm --direct?
I am trying to interpret this result of hdparm:
janus@behemoth ~ $ sudo hdparm -Tt --direct /dev/nvme0n1
/dev/nvme0n1:
Timing O_DIRECT cached reads: 2548 MB in 2.00 seconds = 1273.69 MB/sec
...
1
vote
0
answers
2k
views
Disable disk spindown with sdparm?
I'm using USB drive sat controller so hdparm doesn't fully work for me. How can I disable spindown with sdparm? (equivalent of -B 255, -S 0)
lapsio@nuc ~> sudo hdparm -I /dev/sdb
/dev/sdb:
ATA ...
2
votes
0
answers
279
views
Security features disabled by DCO - how to unfreeze and restore?
I use a Samung 256 GB SDD Model MZ - 7TD2560/0L7 built Octobre 2013. WINMAGIC bootloader with WINDOWS 7 is installed on it.
hdparm -I doesn't report any security features for that drive.
hdparm --...
2
votes
0
answers
874
views
hdparm doesn't show "security" section
I tried to find out the security settings of my Samung 256 GB SDD used on a Lenovo Thinkpad T430.
However, sending "hdparm -I" provides the usual information but omits the "security" section ...
2
votes
2
answers
763
views
To configure hard drive APM levels and maintain them after suspend/resume
On Fedora 25, my laptop's hard drive has a very low APM level (power management), so I use the udev rules from this answer to adjust it with hdparm. However, after resuming from suspend, the APM level ...
0
votes
1
answer
6k
views
Hard drive ignores hdparm settings
An external hard disk sold as “INTENSO USB 3.0 4TB M/CNTR DSKTP HDD PK1” with the model number given by hdparm -I as ST4000DM000-1F2168 (so it's a Seagate Technology drive in the casing) just flat out ...
2
votes
1
answer
1k
views
hdparm : SG_IO: questionable sense data, results may be incorrect
I'm using Ubuntu 16.04 and I would like to know if my system supports the trim command for my SSD. So I typed the following thing :
sudo hdparm -I /dev/nvme0n1 | grep TRIM
and the result is
SG_IO:...
1
vote
0
answers
499
views
hdparm -S60 /dev/sda (Works fine, but every 30 mins HDD wakes up and spins down even though not in use.)
Seagate 4TB 3.5".
$ hdparm -S60 /dev/sda
OK. 5 mins after no access on HDD, it spins down. No problem.
But every 30 mins it wakes up by itself without any event, and goes to bed immediately. I ...
2
votes
0
answers
808
views
Problem with HDD spindown [closed]
I'm trying to spin down my HDD after 10 minutes so I did hdparm -S 120 /dev/sda but it doesn't spin down. (I didn't reboot but I also have an udev rule which executes this command) But when I do ...
3
votes
1
answer
4k
views
One HDD will not automatically go to sleep by hdparm
I'm using hdparm to automatically turn off hard discs after 5 minutes. I use this config:
# cat /etc/hdparm.conf
quiet
/dev/disk/by-id/ata-WDC_WD10EADS-00L5B1_WD-WCAU46879161 {
spindown_time = ...
1
vote
1
answer
2k
views
HDDs won't spin down with hdparm command
I am using Debian Jessie on a HP Proliant Microserver Gen8 with two Western Digital Red 3TB. No RAID or anything else.
I wanted the HDDs to automatically spin down after two hours.
Triggering it ...
0
votes
1
answer
231
views
Measure USB read times for all devices using hdparm
I would like to measure the read times of all mounted USB devices.
I found that hdparm is suited for this:
$ sudo hdparm -tT /dev/sdb1
However, I would like to attach several devices and iterate ...
2
votes
1
answer
2k
views
Hard Drive not spinning down
I built a NAS with a BananaPi and a SATA hard drive. The OS is Bananian (Debian 8/Jessie). I want to put the harddrive into standby mode using hdparm -y.
For some reason this only works, when the ...
4
votes
1
answer
4k
views
How to check if a disk is SSHD (hybrid drive) using ATA commands
Having looked at this question:
(How to know if a disk is an SSD or an HDD)
I am able to detect HDD and SSD.
The problem now is that I don't know how to detect SSHD, since the hdparm tool shows ...
3
votes
0
answers
3k
views
Arch Linux Server: How to spin down HDDs in a BTRFS Raid5 configuration?
This is my first question here; after extensive research I had to reach out for help.
I’ve build a home server based on Arch Linux. It basically has two main purposes: running a Plex Media Server and ...