Setting up Samsung 840 EVO SSDs on Linux

The Samsung 840 EVO SSD is a bit tricky to set up so here are some notes on the process.

Update the firmware

I first tried creating a bootable USB stick using Samsung’s .iso and unetbootin. This didn’t work, it threw an error “PANIC: mcb chain corrupted”. Then I found a great post which described how to use the standard FreeDOS to get it to work. After the update was complete the application warned “FIRMWARE UPDATE UNSUCCESSFUL!!!” although it had actually worked correctly 😀

Partition alignment

Apparently, it’s quite important to align the partitions, especially on SSDs. If it’s wrong the disks can perform poorly and wear out more quickly. This disk uses a new technology (TLC) which has an unusual erase block size of 1536kb. I can’t find anywhere online which explicitly says to use that as the value for the sector boundary, but I guess it would be OK.

I did find a question about aligning the partitions for these disks which explains how to use gdisk to do it. The answer suggests to use the lowest common multiple of 1.5 and 2 to be on the safe side: 6MiB. In brief, you use `gdisk /dev/sdX`, hit “X” for expert mode, “L” to set the sector alignment, and use 6144 as the value. Hit “m” to return to normal mode. Now “p” will show “Partitions will be aligned on 6144-sector boundaries” so you’re ready to create new partitions.

I also created a BIOS boot partition, since my machine uses BIOS rather than UEFI following the instructions from the Arch Linux wiki.


4 thoughts on “Setting up Samsung 840 EVO SSDs on Linux”

  1. Thanks, this article helped me a lot with fixing the speed issues of my 840 EVO 120GB.

    Now, properly aligned and connected with SATA III, I am very close to the speeds from Samsungs spec-sheet. 510 MB/sec reads for example.

    I wouldn’t be surprised if Phoronix had it mis-aligned as well because aligned by 2048 KiB it was indeed just an expensive HDD speedwise, about 100 MB /sec (+/- 25) reads.

    1. Thanx that really helped my, but can you explain why you use mkfs.ext4 -b 4096 -E stride=2,stripe-width=384

      why 4096 and not 3072? and does the stride=2,stripe-width=384 means? i have an 840 evo 250gb and i have a wd blue 1tb. the wd blue also needs the custom shit etc. (4096 alignment). if i understand what you did with the evo i know what to do with my wd blue.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s