I'm working with a linux server and wanted to know if there is a way that I can find out that my SSD supports fstrim or not. I tried hdparm -I /dev/sda
, but it's not available and I can't install it. Is there any other way I can do it? Any help is appreciated. Thanks!
I'm also curious to know what happens if I run fstrim on a device that doesn't support trim? Does it result in a no-op?
Best Answer
You may also try
lsblk --discard
Non-zero values under
DISC-GRAN
andDISC-MAX
indicate trim support.Ensure your disk is trim compatible before running
fstrim
. Runningfstrim
on an SSD that does not provide trim support can result in data loss. For reference, see the Arch Wiki.