09 December 2023

Updating Crucial MX500 Firmware in Linux

On my Crucial MX500, I was noticing a high level of write amplification, which is when you tell it to write 1GB of data, but it actually uses 10GB of writes to the nand flash.  To try to fix this, I decided to see if a firmware update would help with this. 


Identifying the Problem

Substitute /dev/sdX with you drive
  1. Get the smart attributes
    • sudo smartctl -A /dev/sdX
  2. write down the values for 247 and 248, I will refer to thus as A
  3. wait a few days and repeat steps 1 and 2, I will refer to this as B
  4. Now lets calculate
    1. 247C =247B - 247A
    2. 248C = 248B - 248A
    3. (247C + 248C) / 247C
  5. I was seeing values ranging from 10-100, when I believe the typical range should be 1-2.5

    Performing the Update

    Caution: Before doing any of this be sure that you have up to date backups!

    Substitute /dev/sdX with your drive

    • Use smartctl to check what firmware version you currently have installed so you can download the correct version
      • sudo smartctl -i /dev/sdX
      • Example line: Firmware Version: M3CR020
    • Download the correct firmware for your device:
    • Mount the iso
      • sudo mkdir /mnt/iso
      • sudo mount -o loop,ro MX500_M3CR023_update.iso /mnt/iso
    • Create a directory to extract the files to
      • mkdir mx500
      • cd mx500
    • Do the extraction
      • gzip -dc /mnt/iso/boot/corepure64.gz | cpio -idm
    • List the drives
      • sudo ./sbin/msecli -L
    • Perform the Update
      • sudo ./sbin/msecli -U -v -i ./opt/firmware/ -n /dev/sdX

    Conclusion

    It seemed to help but has not completely resolved the problem


    Appendix

    Sources:

    Others experiencing a similar write amplification issue:
    Guide for calculating Write Amplification:

    No comments:

    Post a Comment