Questions tagged [hdparm]

87 questions
14
votes
2 answers

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 (PCI Express), I get: # hdparm -I…
user1902689
  • 1,178
  • 3
  • 12
  • 23
14
votes
1 answer

Disks (in usb enclosure) keep waking up even when not mounted

Setup I have USB enclosure (Buffalo DriveStation Quad) containing four drives connected to my nas server (ubuntu server 14.04). The enclosure is configured to JBOD mode, so I'll see all the disks in in Linux. Two of the disks (sdb and sdc) are…
Toni
  • 401
  • 3
  • 9
14
votes
1 answer

Why are there two different values for the size of a drive and how to reconcile them with device-mapper and LVM?

I have a 1 TB drive attached via USB. It contains an LVM physical volume filling the entire device (without any partition table). When I tried to extend a logical volume by using the entire PV, the device-mapper started to complain that the section…
Feuermurmel
  • 627
  • 1
  • 7
  • 16
10
votes
1 answer

Forced reread of partition table: difference between BLKRRPART and BLKPG ioctl? (Linux)

When I want Linux to consider newly created partitions without rebooting, I have several tools available to force a refresh of the kernel "partition cache": partx -va /dev/sdX kpartx -va /dev/sdX hdparm -z /dev/sdX blockdev --rereadpt…
Totor
  • 19,302
  • 17
  • 75
  • 102
8
votes
2 answers

How to check if a drive supports hotswap?

Not all SATA drives support hot-swap. Especially older models do not seem to work correctly and require the system to be rebooted, despite the fact that the controller works well with newer drives. QUESTION: How do I check if a drive supports…
Konrad Gajewski
  • 437
  • 5
  • 14
6
votes
2 answers

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 Timing O_DIRECT disk reads: 4188 MB in 3.00 seconds…
Alejandro DC
  • 484
  • 5
  • 11
4
votes
2 answers

Where is "hdparm" power management settings stored, in the disk itself or in the OS?

I had set spindown time with a command line hdparm -S 100 /dev/sda1, but it seemed after some reboot (during which I had detached the disk, but then connected it again using the same cable/port), it did not went to sleep. So, I applied the command…
Damn Vegetables
  • 1,187
  • 9
  • 19
4
votes
2 answers

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 looking for. Then is there a way to show read and…
powerhousemethod
  • 435
  • 9
  • 25
4
votes
2 answers

“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 infinite loop. Is there another way to keep the HDD…
neverMind9
  • 1,680
  • 2
  • 18
  • 38
4
votes
1 answer

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, password="mypassword", user=user SG_IO: bad/missing…
MikiBelavista
  • 1,473
  • 8
  • 28
  • 38
4
votes
1 answer

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: hdparm -B 127 /dev/sdX Where 127 is actually the…
Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
4
votes
1 answer

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 that my disk (ST1000DX001) is a classic HDD. Am I…
Peter Cerba
  • 141
  • 1
  • 5
4
votes
2 answers

Get block device model name and manufacturer from pseudo-fs

[gala@arch ~]$ sudo !! sudo hdparm -i /dev/sda /dev/sda: Model=KINGSTON SHFS37A120G, FwRev=603ABBF0, SerialNo=50026B725B0A1515 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% } RawCHS=16383/16/63, TrkSize=0, SectSize=0,…
Gala
  • 341
  • 2
  • 13
4
votes
1 answer

How to get correct scan codes for my laptop keyboard without pressing a key?

I have a problem with the keyboard of my laptop which doesn't work properly anymore. However I have full control of the laptop via ssh. The problem is that I use a self encrypting disk (Samsung 840 Pro). If I turn the laptop of I will perhaps not be…
student
  • 17,875
  • 31
  • 103
  • 169
4
votes
1 answer

CentOS 5 - hdparm - how to set DMA mode

I'm running CentOS 5 with a PATA hard drive. I've used hdparm to tune the hard disk for better performance, but there are 2 settings that don't work: hdparm -M 254 /dev/hda gives the error HDIO_DRIVE_CMD:ACOUSTIC failed: Input/output…
Tensigh
  • 341
  • 2
  • 4
  • 14
1
2 3 4 5 6