Re: fstrim error - AORUS NVMe Gen4 SSD

Ming Lei
2019-07-23T02:19:41Z

Hi,

On Sat, Jul 20, 2019 at 09:41:24PM -0500, davidc502 wrote:
>  Hello,
>
>  I've assembled a X570 board with a 1TB AORUS NVMe Gen4 SSD.
>
>  When attempting to fstrim the NVMe, I receive the following error.
>  davidc502@Ryzen-3900x:~$ sudo fstrim -a -v
>  fstrim: /boot/efi: FITRIM ioctl failed: Input/output error
>  fstrim: /: FITRIM ioctl failed: Input/output error
>
>  Anyhow, I have put some details below which might be helpful. Note that
> this NVMe is supposed to be TRIM and SMART compliant. The SMART outputs are
> available using the utility “nvme-cli”.
>  I am willing to provide whatever command outputs that are needed to help
> solve this issue.
>
>  OS= Ubuntu 18.4.2 LTS
>  Different Kernels I’ve tried = 5.1.16, 5.2 rc7, and 4.18
>  fstrim version =  fstrim from util-linux 2.31.1
>  Firmware version for Aorus NVMe = EGFM11.0
>

I saw discard timeout on HGST 1.6TB NVMe, not sure if yours is same with
that one.

Could you collect logs via the following steps?

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