Hi
I’ve upgraded to an (Samsung T5), updated my fstab entry to new UUID … do i need to worry about TRIM commands or schedule to keep it ticking over? I’m using ext4.
Cheers, Geoff.
Hi
I’ve upgraded to an (Samsung T5), updated my fstab entry to new UUID … do i need to worry about TRIM commands or schedule to keep it ticking over? I’m using ext4.
Cheers, Geoff.
Running fstrim
from time to time doesn’t harm
thx. what about a discard or any other fstab entries?
Might be set already, can check with mount
thx
I’ve added discard to my fstab, but when i run fstrim i get an message that discard not supported.
sudo fstrim /mnt/storage-fstab/
fstrim: /mnt/storage-fstab/: the discard operation is not supported
Here is my logic:
did i miss a step?
Cheers, Geoff
Hi,
Not all SSDs support trim, you should be able to check with:
sudo hdparm -I /dev/sda | grep TRIM
Thanks Tom.
While you haven’t actually provided any evidence for this, a quick search suggests that it should be supported in the T5.
However, I came across this thread: TRIM support for USB drives? | The FreeBSD Forums While it’s from a FreeBSD forum, there was this:
It turned out that the cause of the problem is that FreeBSD does not support UAS / UASP. That’s a newer USB protocol for accessing storage devices. Well, “newer” means it was introduced as part of USB 3.0 in 2010. It’s supported by all major OS like Windows, Linux, MacOS, and even uncommon ones like Solaris. That’s also the reason why the Samsung T5 SSDs are five times faster (!) in Windows and Linux. Also, NCQ and TRIM support works fine with Windows and Linux, but does not work with FreeBSD because it requires UAS / UASP.
I can’t find any evidence that the Vero4K supports UAS (modinfo comes up blank) and the Pi 2/3 version of the OSMC kernel config contains the line CONFIG_USB_UAS is not set
, suggesting that the older Vero4K kernel is unlikely to support it.
This thread How can I check whether USB3.0 UASP (USB Attached SCSI Protocol) mode is enabled in Linux? - Super User shows how to see if the uas driver is being used.
thx Tom
does this output mean ssd and 4K+ Vero OSMC support trim ? I think it looks good, but i’m not sure how to interpret the first line below …
* Data Set Management TRIM supported (limit 8 blocks)
* Deterministic read ZEROs after TRIM
Cheers, Geoff
It seems that UAS/UASP isn’t supported on the Raspberry Pi 2/3. Does Raspberry Pi 3 B+ support UASP? - Raspberry Pi Forums
While UAS can theoretically be implemented on USB 2.0, it will depend on the Vero4K’s hardware capabilities. USB Attached SCSI - Wikipedia. I think @sam_nazarko will be best placed to answer this one.
We use the same DesignWare OTG IP block for USB; so the same limitations exist.
Sam
thanks, does ‘OTG IP block limitations’ that mean my SSD with Vero4K+ doesn’t support the TRIM command?
Is there a TRIM package i can download?
If i can’t get TRIM to work then I’m assuming that my SSD will become quite cluttered with junk and will stop working at some point.
Thanks, Geoff.
You can use tune2fs to set the discard flag on the filesystem itself instead of relying on adjusting /etc/fstab.
UAS isn’t supported, but TRIM should work.
Does fstrim work when you run it on your drive (i.e. /dev/sda1)?
Sam
thx,
i get the ‘discard operation is not supported’ msg.
cheers, Geoff.
Run fstrim and see if it does anything. This is a periodic trim.
here is what i have done …
Cheers, Geoff.
Looks like TRIM is not active here then
Sam
thx, by not active do you mean my drive doesn’t support TRIM?
i ran Tom’s suggested command sudo hdparm -I /dev/sda | grep TRIM, and output does suggest TRIM support, but i’m not sure.
Data Set Management TRIM supported (limit 8 blocks)
Deterministic read ZEROs after TRIM
Cheers, Geoff.
I’m not sure either – I also believe it’s dependent on the caddy used.
thanks. I think your post was spot on … just took a bit of research on my part to actuals understand the requirement for UAS / UASP.
Cheers for the info.
Geoff.
Thanks for the feedback. I don’t have a USB SSD (yet) so couldn’t test anything out for myself but quickly came to the conclusion that TRIM requires UAS/UASP – which isn’t currently available on OSMC.
Perhaps it’ll finally arrive on the Pi 4, which comes with two USB3 ports. STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this - Raspberry Pi Forums (I don’t have a Pi 4, either. )