===== What's this? ===== * I bought an external enclosures, connected via USB3, to run NVMe * enclosure 1 details: * https://www.amazon.co.jp/gp/product/B07YTT4FJH * ELUTENG Type C M.2 SSD enclosure NVME USB3.1 Gen2 10Gbps * lsusb: ID 174c:2362 ASMedia Technology Inc. Best USB Device * can do TRIM, with extra udev rule * enclosure 2 details: * disappeared from Amazon-Japan * lsusb: ID 0bda:9210Realtek Semiconductor Corp. RTL9210 M.2 NVME Adapter * can do TRIM, with extra udev rule ===== Udev rule to perform TRIM ===== Mounting the device per default, no TRIM is supported: fstrim: /mnt/tmp: the discard operation is not supported Setting up a special udev rule: # cat >/etc/udev/rules.d/10-extern-nvme.rules < Then unplug/plug the device, and after mounting 'fstrim' succeeds. ===== Performance impact intern vs. extern NVMe ===== Running the 256GB SSD internally in a Thinkpad L480, measuring uncached reads blockwise: # dd if=/dev/nvme0n1 of=/dev/null bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.771196 s, 1.4 GB/s Connecting the same drive externally via the enclosure: # dd if=/dev/sda of=/dev/null bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 2.42096 s, 444 MB/s