Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

BTRFS TRIM doesnt work

Featured Replies

I have a LSI 9201-16i.

I noticed that my TRIM command doesnt work.

I read some stuff about some controllers not supporting TRIM but not sure what the work around is for it.

Nov 28 02:00:12 unRAID kernel: print_req_error: critical target error, dev sdl, sector 1950351263

Nov 28 02:00:12 unRAID kernel: BTRFS warning (device sdl1): failed to trim 1 device(s), last error -121

Nov 28 02:00:12 unRAID root: /var/lib/docker: 31.9 GiB (34268774400 bytes) trimmed on /dev/loop2

I am using 2x Samsung 860 Evo 1tb drives as my cache.

 

Is there anything I can do, or do I really need to get this working? IF I dont will I see issues down the line?

unraid-diagnostics-20191128-1021.zip

Edited by SavellM

  • Community Expert

It's a known issue, it only works with SAS3 models, SAS2008 based models work with firmware downgraded to p16, it might also work for SAS2016 models, but a better solution would be to use the onboard Intel SATA ports if possible.

 

 

  • Author

Hey Johnnie, 

I could in theory use onboard SATA, but I have my 2 cache drives in the front of my case using the backplane.

It would be so much better/easier to keep them there as they run a lot cooler. 

 

I have a SAS3008 (which you probably noticed in the logs) but I cant remember which firmware its running.

How come you have to downgrade firmware for it to work?

Edited by SavellM

  • Community Expert

I didn't noticed at first, you also have one LSI 9300-8i or similar, connect the SSDs there, that one will trim them.

  • Author

Ok I just looked at the diagram for my backplane BPN-SAS-846A and where I connected the SAS3008 to.

I'll move my drives around tonight hopefully. 

 

I have 8 ports running of this controller and the rest off the 9201-16i.

 

It wont matter the mix match of controllers to the backplane will it?

 

  • Community Expert
1 minute ago, SavellM said:

It wont matter the mix match of controllers to the backplane will it?

That's not a problem.

  • Author

Perfect! I'll move the drives around tonight when I get home 

  • Community Expert

Also note that LSI requires SSDs with determinist trim support, or trim won't work, 860 EVO that you are using supports it, but if for example you were using the 850 EVO it wouldn't' work.

  • Author

Phew well I lucked out there :)

Thanks for your help, really appreciate it.

  • Author

Thanks @johnnie.black

Switched the drives and:

root@unRAID:~# fstrim -v /mnt/cache
/mnt/cache: 1.8 TiB (1918192943104 bytes) trimmed

  • Community Expert

👍

Quote
Quote

 

 

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.