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.

Cache Trim Failing? ("FITRIM ioctl failed: Remote I?O error") (SOLVED)

Featured Replies

I am using the Dynamix SSD Trim tool to run trim on my cache at this time each evening.

And each time it runs I get the following error (via email report):

cron for user root /sbin/fstrim -a -v | logger &> /dev/null
Console and webGui login account

    fstrim: /mnt/cache: FITRIM ioctl failed: Remote I/O error

Can anyone help me understand why the trim command is failing?

 

Edited by Ruthalas
Changed screenshot to selectable text

  • Community Expert

Likely because the controller doesn't support trim, connect the SSD to one of the onbaord SATA ports.

  • Author

I will give that a try. Thank you!

  • Author

That seems to have worked. Thank you!

  • 11 months later...

So I've tested several firmware version to track down where the issue was introduced and the firmware that I was able to get this working correctly is P16. (LSI HBAs LSI SAS2308/SAS2008)

 

To those who are seeing this error, you might want to downgrade to P16 firmware and your FSTRIM would work with your SSDs (obviously if it is supported).

 

Tested firmware version:

 

P14 -> YES

P15 -> YES

P16 -> YES

P17 -> NO

P18 -> NO

P19 -> NO

P20 -> NO

 

Cheers.

 

Guide and files for 9201-16i and 9207-8i:

 

lsi-flash-efi.zip

 

NOTE: You need to boot the efi shell attached in order to proceed with the flashing process.

Edited by ezhik

  • Community Expert
1 hour ago, ezhik said:

to get this working correctly is P16.

That's interesting, so trim working depends on the driver version and the firmware version and the filesystem used, still I wouldn't downgrade firmware because of trim, you might miss on important fixes, especially when used with the newer driver, just use the onboard SATA ports.

11 minutes ago, johnnie.black said:

That's interesting, so trim working depends on the driver version and the firmware version and the filesystem used, still I wouldn't downgrade firmware because of trim, you might miss on important fixes, especially when used with the newer driver, just use the onboard SATA ports.

1) If you review the release notes between P16 and P20, most fixes are not for IT mode.

2) You are assuming everybody has SATA3 (6gb/s) ports available on their motherboards for SSDs. One of my servers only has SATA2 ports.

3) Drivers are generally built with backwards compatibility and I doubt it for HBAs it would play a big role if you are running it on an older firmware.

  • Community Expert
10 minutes ago, ezhik said:

2) You are assuming everybody has SATA3 (6gb/s) ports available on their motherboards for SSDs. One of my servers only has SATA2 ports.

I would prefer using onboard SATA2 than downgraded LSI, though it can be a good option for those users that don't have any onboard SATA ports, like some Dell servers.

8 hours ago, johnnie.black said:

I would prefer using onboard SATA2 than downgraded LSI, though it can be a good option for those users that don't have any onboard SATA ports, like some Dell servers.

Sacrificing performance over stability makes sense, when that's the case.

 

It is also important to make the distinction that new doesn't always mean good. Majority of us worked in IT for decades (possibly including yourself) and we know that new releases cause all sorts of sh*t storms incompatibility and stability issues.

 

Hence why you always read the release notes and assess whether or not you even need these new updates.

 

Obviously security comes first and we have to deal with repercussions as they come.

 

NOTE: It seems LSI mostly patched the IR firmware and IT doesn't seem to need as many patches.

 

 

  • 6 months later...
On 3/1/2019 at 11:53 PM, ezhik said:

So I've tested several firmware version to track down where the issue was introduced and the firmware that I was able to get this working correctly is P16. (LSI HBAs LSI SAS2308/SAS2008)

 

To those who are seeing this error, you might want to downgrade to P16 firmware and your FSTRIM would work with your SSDs (obviously if it is supported).

 

Tested firmware version:

 

P14 -> YES

P15 -> YES

P16 -> YES

P17 -> NO

P18 -> NO

P19 -> NO

P20 -> NO

 

Cheers.

Sorry to dredge up an old thread... But I saw my trim was failing on my 9207-8i card. Downgraded to firmware 16, and trim works correctly now. 

 

Thank you for the tip.

49 minutes ago, JasonJoel said:

Sorry to dredge up an old thread... But I saw my trim was failing on my 9207-8i card. Downgraded to firmware 16, and trim works correctly now. 

 

Thank you for the tip.

Good stuff, glad this is useful. Cheers!

  • 2 months later...
On 3/2/2019 at 12:53 AM, ezhik said:

So I've tested several firmware version to track down where the issue was introduced and the firmware that I was able to get this working correctly is P16. (LSI HBAs LSI SAS2308/SAS2008)

 

To those who are seeing this error, you might want to downgrade to P16 firmware and your FSTRIM would work with your SSDs (obviously if it is supported).

 

Tested firmware version:

 

P14 -> YES

P15 -> YES

P16 -> YES

P17 -> NO

P18 -> NO

P19 -> NO

P20 -> NO

 

Cheers.

I'm experiencing the same issue. I have a Dell H310 flashed to IT Mode using firmware P20. My trim commands continue failing with the I/0 error. I've read conflicting information about downgrading. Since I'm already in IT mode is there a simpler command to run and do I need to include the SAS address or not? Thanks in advance

  • Community Expert
I have a Dell H310 flashed to IT Mode using firmware P20. My trim commands continue failing with the I/0 error.

Currently it will never work with p20, IMHO you're better off using another controller for the SSD(s) than downgrading firmware, but if that's not an option... 

 

 

 

17 minutes ago, johnnie.black said:

Currently it will never work with p20, IMHO you're better off using another controller for the SSD(s) than downgrading firmware, but if that's not an option... 

 

 

 

I'm aware it does not work on P20. I'm fine with downgrading to p16. I'm just unsure of how to do that, was looking for assistance on downgrading.

After much trial and error I was able to downgrade to P16 and Trim is working. Thanks ezhik you saved me many headaches!

  • Community Expert
11 hours ago, matt_aggz said:

I'm fine with downgrading to p16. I'm just unsure of how to do that, was looking for assistance on downgrading.

Sorry, your question wasn't clear for me, glad you that sorted out.

11 hours ago, matt_aggz said:

After much trial and error I was able to downgrade to P16 and Trim is working. Thanks ezhik you saved me many headaches!

Happy to see my research is helping the community!

 

Cheers mate!

I added an SSD cache drive, and when the trim schedule runs it gives the same error as the OP.
When I run the command manually, I get:

root@Tower$ /sbin/fstrim -a -v
/etc/libvirt: 50 GiB (53685309440 bytes) trimmed on /dev/loop4
/var/lib/docker: 30.6 GiB (32834031616 bytes) trimmed on /dev/loop3
/mnt/cache: 896 GiB (962065899520 bytes) trimmed on /dev/mapper/sdi1
fstrim: /tmp/overlay: FITRIM ioctl failed: Input/output error

Does the "trimmed on /dev/X" part mean that the trim worked, and something after the trim didn't?
I've attached output of the "hdparm -I /dev/sdi" command.
I've changed the cable too, but it didn't make a difference.

hdparm.txt

  • Community Expert

Those messages mean that the first 3 trim operation worked and whatever is mounted as /tmp/overlay (which is not a location that exists on a default Unraid install) could not be trimmed.

 

Having said that the figures for /etc/libvirt look a bit strange as the libvirt.img file mounted at that location is normally only 1GB in size :(.  Is yours different for some reason?   Even the figure for the docker.img file is more than I would normally expect unless you increased the size above the default of 20GB for some reason.

 

33 minutes ago, itimpi said:

Those messages mean that the first 3 trim operation worked and whatever is mounted as /tmp/overlay (which is not a location that exists on a default Unraid install) could not be trimmed.

 

Having said that the figures for /etc/libvirt look a bit strange as the libvirt.img file mounted at that location is normally only 1GB in size :(.  Is yours different for some reason?   Even the figure for the docker.img file is more than I would normally expect unless you increased the size above the default of 20GB for some reason.

 

Ah, that overlayfs is something I have for my "/root" directory. So I can disregard that error then.

I've changed my libvirt.img to 1GB, thanks for the heads up!

  • 1 month later...

I would like to come back to that post as I installed a LSI Card (flashed onP20) yesterday and had this error message in my inbox this morning (My 2 Cache drives are connected to this Controller).

From reading im not sure what to do now. Do I have to change the libvirt.img and if yes, how? My Docker image is still at 20GB.

Or can I just ignore this warning? Of course, at least I could change the cables on the motherboard...

Edited by Toobie

  • Community Expert
11 minutes ago, Toobie said:

Of course, at least I could change the cables on the motherboard...

That would be the recommended thing to do.

  • 1 month later...
On 12/28/2019 at 7:34 AM, ezhik said:

Happy to see my research is helping the community!

 

Cheers mate!

Can anyone make a simple guide/walkthrough for this. I am running the most current version, but would love to downgrade to have drives trimmed!

  • 3 months later...
On 3/18/2020 at 8:11 PM, mihcox said:

Can anyone make a simple guide/walkthrough for this. I am running the most current version, but would love to downgrade to have drives trimmed!

lsi-flash-efi.zip

 

This works in EFI via the attached efi shell.

  • 4 weeks later...
On 7/1/2020 at 1:20 PM, ezhik said:

lsi-flash-efi.zip 1.42 MB · 5 downloads

 

This works in EFI via the attached efi shell.

 

Thanks for this, do i just boot into the LSI, then run this from there and it should be fine?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.