Skip to content

UDEV rules to enable trim/discard for usb connected SSDs

Notifications You must be signed in to change notification settings

Nuts-Underline/usb_ssd_trim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

usb_ssd_trim

How to make possible to use trim/discard functions on SSD connected via USB. Trim not working in such case by default: its a long story about ATA, SCSI and USB....

There is an set of UDEV rules to enable trim/discard for usb connected SSDs with differnt USB-SATA/NVME controllers (Realtek, VIA, ASM)

File 50-usb-ssd-trim.rules must be placed to /etc/udev/rules.d

then reload udev like

udevadm control -R -S

or

service udev force-reload

Then

lsblk --discard

if DISC-GRAN not equal to zero then trim working, it must be 0 on HDDs

Commits are welcome. Please send only tested VID,PID

Use on own risk only: some USB storage not handle trim correctly, even can be damaged

tested on my own USB SSD drives

based on

https://wiki.gentoo.org/wiki/Discard_over_USB

https://askubuntu.com/questions/262154/trim-and-ssd-with-usb-3-0-enclosure-does-not-work-uasp-not-supported

About

UDEV rules to enable trim/discard for usb connected SSDs

Resources

Stars

Watchers

Forks