To answer my own question, at least with the Kingston SSD I'm using, yes indeed, trim is enabled by default. I booted via a USB3 SSD, without trim enabled on the SSD (/dev/sda). However, the NVME drive, which was not mounted on this system, shows that trim is enabled on the NVME drive, while the SSD boot disk does not have trim enabled.So, at least some NVME disks have trim enabled by default, and lsblk --discard can be used scriptically to check. I'm good.
Also, FYI, the information in that link are an incomplete version of what Jeff Geerling wrote up in 2020 on enabling trim.
FYI#2: Check out satrim for an automated "enable trim" tool. satrim is the standalone version. sdm has a plugin that enables you to automate trim enable as part of fully customizing your IMG.
Code:
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZEROsda 0 0B 0B 0├─sda1 0 0B 0B 0└─sda2 0 0B 0B 0nvme0n1 0 512B 2T 0├─nvme0n1p1 0 512B 2T 0└─nvme0n1p2 0 512B 2T 0
As i mentioned in the OP, the NVME drive doesn't look anything like a SCSI disk in Linux. The information in this link are for SCSI-type disks, such as a USB3-connected SSD.A short article to check the trimming possibilities of your disc:
https://www.guyrutenberg.com/2021/11/20 ... ernal-ssd/
Also, FYI, the information in that link are an incomplete version of what Jeff Geerling wrote up in 2020 on enabling trim.
FYI#2: Check out satrim for an automated "enable trim" tool. satrim is the standalone version. sdm has a plugin that enables you to automate trim enable as part of fully customizing your IMG.
Statistics: Posted by bls — Wed Jan 31, 2024 6:33 pm