Last active
August 19, 2019 09:25
-
-
Save malakudi/b6509568c440054440d0b68b5efb0b1e to your computer and use it in GitHub Desktop.
Enable trim support for external UAS device that is not enabled automatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTION=="add|change", ATTRS{idVendor}=="152d", ATTRS{idProduct}=="0578", SUBSYSTEM=="scsi_disk", ATTR{provisioning_mode}="unmap" | |
ACTION=="add|change", ATTRS{idVendor}=="152d", ATTRS{idProduct}=="0578", SUBSYSTEM=="block", ATTR{queue/discard_max_bytes}="16777216" | |
Second line was needed for my device because it could not handle TRIM with larger than 16MB blocks (automatically detected as 4GB), it would give CDB errors like: | |
kernel: sd 10:0:0:0: [sda] tag#25 CDB: Unmap/Read sub-channel 42 00 00 00 00 00 00 00 18 00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment