Are you running this command from within a virtual machine?
Are you running this command from within a virtual machine?
Please read The Forum Rules and The Forum Posting Guidelines
A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
This universe is crazy. I'm going back to my own.
FYI,
Phoronix benchmarked a PCIe 4.0 SSD on Ubuntu, so the NVMe driver does work - at least with the tested drive.
https://www.phoronix.com/scan.php?pa...ce-mp600&num=1
Note: The testing used the 5.2 kernel, so that might be what's needed.
Last edited by Dennis N; July 21st, 2019 at 03:11 AM. Reason: added the note.
Ongoing saga for fstrim. I Turned on kernel tracing for the nvme as per instructions from someone willing to help out. Unfortunately, the person helping doesn't know enough about error to help further, but are trying to enlist others to help.
Could you collect logs via the following steps?
Code:Suppose your nvme disk name is /dev/nvme0n1: 1) queue limits log: #(cd /sys/block/nvme0n1/queue && find . -type f -exec grep -aH . {} \;) 2) NVMe IO trace - enable nvme IO trace before running fstrim: #echo 1 > /sys/kernel/debug/tracing/events/nvme_setup_cmd/enable #echo 1 > /sys/kernel/debug/tracing/events/nvme_complete_rq/enable - run fstrim - after the fstrim failure is triggered, disable the nvme io trace & post the log: #echo 0 > /sys/kernel/debug/tracing/events/nvme_setup_cmd/enable #echo 0 > /sys/kernel/debug/tracing/events/nvme_complete_rq/enable #cp /sys/kernel/debug/tracing/trace /root/nvme_io_trace.log
thanks,
Ming
Hello Ming
Thank you for the quick reply See attached
From the IO trace, discard command(nvme_cmd_dsm) is failed:
From the IO trace, discard command(nvme_cmd_dsm) is failed:
kworker/15:1H-462 [015] .... 91814.342452: nvme_setup_cmd: nvme0: disk=nvme0n1, qid=7, cmdid=552, nsid=1, flags=0x0, meta=0x0, cmd=(nvme_cmd_dsm nr=0, attributes=4)
<idle>-0 [013] d.h. 91814.342708: nvme_complete_rq: nvme0: disk=nvme0n1, qid=7, cmdid=552, res=0, retries=0, flags=0x0, status=8198
And the returned error code is 0x8198, I am not sure how to parse the
'Command Specific Status Values' of 0x98, maybe Christoph, Keith or our other
NVMe guys can help to understand the failure.
Thanks,
Ming
Last edited by backspin; July 23rd, 2019 at 11:15 PM.
Phoronix didn't test trim - it's just performance benchmarking. My suggestion in the note is that a newer kernel is often needed to support all features of newest hardware. For that Corsair drive and yours, the vendor information I saw is that the drive supports trim. But maybe you need the latest kernel to make trim work.
That's the 10k question at this point. I've opened a case with Gigabyte asking if there are any firmware updates, but will take 3-5 days to get back with me. I was hoping to see more people with PCIe 4.0 drives with issues so we could press this issue more, but appears this is bleeding edge for Ubuntu and the trim utility. I think another issue is I went off the beaten path by going with a Gigabyte SSD which is actually made by Phision, so this may be a while before it gets enough recognition to be fixed.
Are you using an m.2 drive with adapter? If you have an unused PCIe 3 slot, you could move the adapter and drive to that and see if trim works with drive operating at PCIe 3 speed. These devices are supposed to be backward compatible.
Last edited by Dennis N; July 24th, 2019 at 12:37 PM.
Bookmarks