Jump to content
therapist

Samsung SSD HBA TRIM

92 posts in this topic Last Reply

Recommended Posts

@ezhikfound that downgrading LSI 2008/2308 firmware to p16 restores the trim function with current driver, so the trim issue is caused by the driver and the firmware and the filesystem, and while I personally wouldn't like to be running an older firmware it might be worth considering for users without a better option.

Share this post


Link to post

That just proves that someone could release a firmware update adding it back in with current fixes and yes I understand it's not just that simple, I'm sure it was "removed for a reason". I was on a previous release and it would cause chaos. P20 hasn't had a single glitch( on my system). 

Share this post


Link to post
4 hours ago, slimshizn said:

That just proves that someone could release a firmware update adding it back in with current fixes and yes I understand it's not just that simple, I'm sure it was "removed for a reason". I was on a previous release and it would cause chaos. P20 hasn't had a single glitch( on my system). 

 

What type of chaos and what release of the firmware?

Share this post


Link to post

Confirmed a 9300-8i (P16) resolves the TRIM issues with BTRFS.

root@arnold:~# fstrim -av
/etc/libvirt: 920.7 MiB (965439488 bytes) trimmed
/mnt/disks/vm_ssd_1: 219 GiB (235152539648 bytes) trimmed
/mnt/cache: 202.6 GiB (217502179328 bytes) trimmed

 

Share this post


Link to post
5 hours ago, slimshizn said:

@ezhik 

Here's the issue I had with previous firmware. 

 

Interesting, I wonder if you had a beta P20 release. Also, no expander here so I cannot comment on the compatibility. 

Share this post


Link to post

I have this issue, running H310 HBA with an 860 Pro SSD in cache formatted as XFS. My cache used to be a btrfs raid with three SSDs but it caused major performance problems. Formatting to XFS solved that. It sounds like ext4 would solve this trim problem. Is formatting the cache drive as ext4 even an option?

Share this post


Link to post
5 minutes ago, Zuluster said:

. Is formatting the cache drive as ext4 even an option?

no

5 minutes ago, Zuluster said:

running H310 HBA with an 860 Pro SSD

Why not connect the SSD directly to your motherboard port?

Share this post


Link to post
4 minutes ago, Squid said:

Why not connect the SSD directly to your motherboard port?

Dell R620XD, I don't see a way to power the drives outside of the backplane, although I haven't looked extensively. I was looking at the flex bays for mounting the SSDs but I think those go through the HBA just the same.

Edited by Zuluster

Share this post


Link to post
1 hour ago, Zuluster said:

I have this issue, running H310 HBA with an 860 Pro SSD in cache formatted as XFS. My cache used to be a btrfs raid with three SSDs but it caused major performance problems. Formatting to XFS solved that. It sounds like ext4 would solve this trim problem. Is formatting the cache drive as ext4 even an option?

Ive switched to a 9300-8i and have had no TRIM issues since.  I tried various other LSI card previously -- 9207 / 9201 / 9211 -- and they all have issues with the latest MP2SAS/MP3SAS software. Id recommend upgrading your HBA card or running off motherboard ports if you really want TRIM. Prior to my upgrade I had run without TRIM for almost a year with regular operation (.5-1 TBw/d) and no performance issues with my 860s

Share this post


Link to post

same here . also had trim problems with my samsung 960's btrfs but after reading on this forum about the issues and solution i replaced my lsi card with a 9300-8i model all trim issues solved.

The motherboard satas where all used already but that would have been an alternative solution.

 

Share this post


Link to post

Bear in mind for those with SAS2008 HBAs that want to downgrade to P16; its not a straightforward sas2flsh.exe -o -f 2118it.bin. These are the requirements I've found but the list is by no means exhaustive:

  1. You will need to clear the SBR and the Flash using megarec first. Make sure you note your SAS address prior to doing so!
  2. If running a PERC card (H200 in my case) you will need to flash a suitable Perc Firmware file THEN reboot THEN flash the P16 firmware file.
  3. Make sure you have a suitable version of sas2flsh that supports downgrades as well as IR to IT changes if you require this. I've found version 5 to work for me but YMMV.

Above all else; do not rush this. It takes one mistake / reboot to brick your card.

My H200 is now running P16 on 6.80rc6 with two Samsung 860 EVOs as mirror'd cache drives. Trim works wonderfully and confirmed via:

root@Tower:~# fstrim -v /mnt/cache
/mnt/cache: 359.1 GiB (385629904896 bytes) trimmed

 

Edited by Trunkz

Share this post


Link to post

Confirmed! Downgraded my LSI-9207-8e from P20_IT to P16_IT and fstrim worked great. I am running 4x860 EVOs in a BTRFS array as my cache pool.

 

Thanks to whoever that found the solution :D

Edited by crazystar

Share this post


Link to post

As others have already said downgrading the firmware from P20 to P16 fixes TRIM on my 860 EVO. However, I recently upgraded my regular H310 to an H710 mini mono card in my R720xd and I'd like to share a few things. First off, a tool has been made which will effortlessly flash H310 mini mono, H710(p) mini mono and H710(p) full sized cards (https://fohdeesha.com/docs/perc/). I followed this procedure for my H710 rev. D1 and it worked flawlessly. The issue is that this tool uses P20 firmware and replacing the P20 firmware file with a P16 firmware one stops the tool from working as it can't boot the P16 firmware from RAM. Due to the mini mono cards needing some special flashing techniques to not brick them, I wasn't sure how to attempt to downgrade the card from P20 to P16. In the end I managed to downgrade the firmware in a very simple matter. I copied the P16 firmware for my card to the location where the other firmware is stored and named it 9207-8_p16.bin. Then, I modified the line in the D1-H710 script that flashes the card to use the 9207-8_p16.bin instead of the regular P20 version. To clarify, this script will boot the card with P20 firmware from RAM, and then proceed to flash the P16 firmware to the card. All in all, it was very simple to do and I see no reason why flashing the card directly in this manner would not work either. For more info on the matter see this GitHub issue https://github.com/Fohdeesha/lab-docu/issues/6

 

 

Share this post


Link to post
Posted (edited)

Just a small bump for an advice.

My hba is a 9207-8e :

sas2flash -list
LSI Corporation SAS2 Flash Utility
Version 20.00.00.00 (2014.09.18) 
Copyright (c) 2008-2014 LSI Corporation. All rights reserved 

        Adapter Selected is a LSI SAS: SAS2308_2(D1) 

        Controller Number              : 0
        Controller                     : SAS2308_2(D1) 
        PCI Address                    : 00:03:00:00
        SAS Address                    : 500605b-0-098c-fb80
        NVDATA Version (Default)       : 14.01.00.06
        NVDATA Version (Persistent)    : 14.01.00.06
        Firmware Product ID            : 0x2214 (IT)
        Firmware Version               : 20.00.07.00
        NVDATA Vendor                  : LSI
        NVDATA Product ID              : SAS9207-8e
        BIOS Version                   : 07.39.02.00
        UEFI BSD Version               : 07.27.01.01
        FCODE Version                  : N/A
        Board Name                     : SAS9207-8e
        Board Assembly                 : H3-25427-02H
        Board Tracer Number            : SV43732784

        Finished Processing Commands Successfully.
        Exiting SAS2Flash.

I downloaded packages from broadcom. Should i downgrade bios and/or uefi also ?

What is the best way for downgrading ?

Could it be done from unraid cli with array stopped ?

 

edit: forgot to mention i want to downgrade to P16 to use 860 EVO ssd.

Edited by caplam
add intel

Share this post


Link to post

Answer to myself:

I rebooted with an efi shell on usb  key.

The efi shell had to be named bootx64.efi and placed in /EFI/boot on a FAT32 usb key.

At the root directory you must place the bin file (name according to your card), the sas2flash.efi and the mptsas2.rom

As my card was in P20 firmware i used the P20 efi installer.

Be sure to note the sas address of the card before flashing.

In my case the difficulty was to find a suitable shell efi file for my server (a hp Z620). I had also no idea on how to have an efi bootable usb key.

Now it's done. I'm running P16 firmware.

 sas2flash -list
LSI Corporation SAS2 Flash Utility
Version 20.00.00.00 (2014.09.18) 
Copyright (c) 2008-2014 LSI Corporation. All rights reserved 

        Adapter Selected is a LSI SAS: SAS2308_2(D1) 

        Controller Number              : 0
        Controller                     : SAS2308_2(D1) 
        PCI Address                    : 00:03:00:00
        SAS Address                    : 500605b-0-098c-fb80
        NVDATA Version (Default)       : 10.00.00.04
        NVDATA Version (Persistent)    : 10.00.00.04
        Firmware Product ID            : 0x2214 (IT)
        Firmware Version               : 16.00.00.00
        NVDATA Vendor                  : LSI
        NVDATA Product ID              : SAS9207-8e
        BIOS Version                   : 07.31.00.00
        UEFI BSD Version               : N/A
        FCODE Version                  : N/A
        Board Name                     : SAS9207-8e
        Board Assembly                 : H3-25427-02H
        Board Tracer Number            : SV43732784

        Finished Processing Commands Successfully.
        Exiting SAS2Flash.

I can now trim my evo 860 unassigned ssd.

 

 fstrim -v /mnt/disks/Samsung_SSD_860_EVO_500GB_xxxxxxxxxxxxxx/
/mnt/disks/Samsung_SSD_860_EVO_500GB_xxxxxxxxxxxxxx/: 219.4 GiB (235542450176 bytes) trimmed

Thank you @johnnie.black for P16 firmware tip.

Share this post


Link to post
7 minutes ago, caplam said:

Thank you @johnnie.black for P16 firmware tip.

Your welcome but that wasn't me :)

Share this post


Link to post

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.