You are not logged in.

#1 2022-04-02 20:30:35

wrongturn
Member
Registered: 2021-10-17
Posts: 10

Running hdparm -I on my NVMe drives only prints the device name

Hi. I'm trying to get TRIM working on my hard drive by following the steps in https://wiki.archlinux.org/title/Solid_state_drive#TRIM, but I noticed some strange results trying to run hdparm to query information about the drive. I currently have two drives installed on my system, nvme0n1 is a WD Black SN850 NVMe that I use for Arch, and nvme1n1 is a Samsung 970 EVO NVMe drive that I use for dual booting with Windows.

The output from lsblk looks normal and seems to indicate TRIM support on both drives.

# lsblk --discard

NAME            DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
nvme0n1                0      512B       2T         0
├─nvme0n1p1            0      512B       2T         0
└─nvme0n1p2            0      512B       2T         0
  └─cryptsystem        0        0B       0B         0
nvme1n1                0      512B       2T         0
├─nvme1n1p1            0      512B       2T         0
├─nvme1n1p2            0      512B       2T         0
├─nvme1n1p3            0      512B       2T         0
└─nvme1n1p4            0      512B       2T         0

But running hdparm on both drives just prints out the device names

# hdparm -I /dev/nvme0n1

/dev/nvme0n1:
# hdparm -I /dev/nvme1n1

/dev/nvme1n1:

I have not found any other threads related to this issue with hdparm. So I'm wondering if it's safe or not to enable TRIM on /dev/nvme0n1? I would also appreciate suggestions for how to get hdparm to display information about my drives. The drives work fine otherwise.

Offline

#2 2022-04-02 20:47:45

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Running hdparm -I on my NVMe drives only prints the device name

Are these drives connected directly to the motherboard or is there some sort of bridge device inbetween?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-04-02 20:49:51

wrongturn
Member
Registered: 2021-10-17
Posts: 10

Re: Running hdparm -I on my NVMe drives only prints the device name

They're connected to the slots on the motherboard, as shown on https://www.msi.com/Motherboard/MAG-B550-TOMAHAWK

Offline

#4 2022-04-02 23:52:05

wrongturn
Member
Registered: 2021-10-17
Posts: 10

Re: Running hdparm -I on my NVMe drives only prints the device name

Did some more digging into this and noticed that hdparm has a verbose option. Running hdparm on nvme0n1 gave the message:

HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device

Googling the message revealed this answer https://superuser.com/a/1412510. Basically hdparm is built for ATA devices, and it does not support NVMe drives. To get similar functionality for NVMe drives, the nvme-cli tool should be used as detailed in https://wiki.archlinux.org/title/Solid_state_drive/NVMe.

Last edited by wrongturn (2022-04-02 23:54:55)

Offline

Board footer

Powered by FluxBB