In case you didn’t know, you can boot RaspberryPi 4 from a USB without the micro SD card, and the process takes only about 10 min to set up. It’s time to talk about USB boot options. Adding an external drive to a Raspberry Pi 4 my work for you, but it looks ugly. One way to go about it would be to get a NAS kit – like the one from SunFounder (review). Another option is a Pi specific add on board. I bought an X857 mSATA for Raspberry Pi 4 from Geekworm for that purpose.
Why mSATA SSD?
You could roughly translate mSATA to mobile: Serial ATA. An SSD designed for portable applications. While M.2 is storming laptop markets, slightly older (2 years older) mSATA is still widely available. Small form factor and SSD alike speeds are just perfect for Raspberry Pi applications.
Even though M.2 interface can outperform mSATA and reach speeds above 6Gbps thanks to PCIe and NVME, mSATA drives are unlikely to be a bottleneck in a typical use case scenarios. The popularity of M.2 means that while mSATA drops out of favours, it can offer a very competitive price for a medium storage solution. A reputable micro SD card on Amazon with 128GB of storage costs around £17. It will be slower and more prone to degradation. You could snatch an mSATA SSD for a similar price from a reputable AliExpress seller which will offer up to 5 times the read/write speeds!
X857 mSATA for Raspberry Pi 4
To take advantage of my budget mSATA I need an adapter. I’m using X857 mSATA for Raspberry Pi 4 from Geekworm which parasites to USB 3.0 port with a small bridge. The add-on card is roughly the same size as the Rasberry Pi 4 board and it latches underneath the PCB using 4 metal standoffs.
I’m used to different HATs and extensions so fixing X857 mSATA to a Raspberry Pi 4 takes only a minute or so. It’s a USB drive so Linux sees it as any other SSD without any need for the drivers. Note that bigger mSATA (I have 64GB version) may require an additional power supply to work. X857 mSATA for Raspberry Pi 4 comes with 2 power connectors, one for a barrel jack and one for 5V supply cable that could be linked to power GPIO pins.
The X857 mSATA for Raspberry Pi 4 is limited by the speed of the actual mSATA SSD than the USB 3.0 capable of 5Gbps transfers. Pick a drive with a decent 500MB/s read/write performance and it will feel no different than a regular SSD.
I ordered a bundle with a cooling case made of aluminium with dual fans (review soon). Since this is not required for X857 mSATA board to work, I will talk about the thermal performance in a separate post.
Benchmarks of X857 mSATA for Raspberry Pi 4
I pretty much know where the bottleneck will be at this point, but it’s a good idea to run a couple off SSD benchmarks set the expectations right. I’m pretty sure it will smoke out of the water any microSD card.
dd bs=1M count=256 if=/dev/zero of=test conv=fdatasync
|micro SD||(268 MB, 256 MiB) copied, 15.5036 s, 17.3 MB/s|
|mSATA SSD||(268 MB, 256 MiB) copied, 1.59187 s, 169 MB/s|
|mSATA SSD||(1.1 GB, 1.0 GiB) copied, 5.22946 s, 205 MB/s|
|mSATA SSD (OS on micro SD)||(268 MB, 256 MiB) copied, 1.75214 s, 153 MB/s|
|mSATA SSD (OS on micro SD)||(1.1 GB, 1.0 GiB) copied, 6.69296 s, 163 MB/s|
I also tried
hdparm in the more taxing mode to deliver closer to real tasks speeds:
sudo hdparm -t /dev/sda1
|micro SD||50 MB in 3.10 seconds = 16.10 MB/sec|
|mSATA SSD||718 MB in 3.00 seconds = 239.06 MB/sec|
|mSATA SSD (OS on micro SD)||1068 MB in 3.00 seconds = 355.69 MB/sec|
and lastly most taxing
fio which basically grinds the storage until it has enough:
fio --name=random-write --ioengine=posixaio --rw=randwrite --bs=4k --numjobs=1 --size=4g --iodepth=1 --runtime=60 --time_based --end_fsync=1
|micro SD||WRITE: bw=2111KiB/s|
|mSATA SSD||WRITE: bw=61.6MiB/s|
|mSATA SSD (OS on micro SD)||WRITE: bw=14.2MiB/s|
I’m not a fan of synthetic benchmarks as I don’t care much for “best scenario” numbers. So I tried 2 most common things that I would be doing with Raspberry Pi – note that the tests were performed on the system installed on the SSD drive.
|medium||copy (1GB)||SMB read (1GB)||SMB write (1GB)|
|micro SD (class 4 garbage)||2min 55 sec||14 sec||2min 57 sec|
|micro SD (class10)||57 sec||10 sec||57 sec|
|mSATA SSD||14 sec||9 sec||13 sec|
|mSATA SSD (OS on garbage micro SD)||11 sec||9 sec||11 sec|
|mSATA SSD (OS on class 10 micro SD)||12 sec||9 sec||12 sec|
It looks like having Raspbian OS on SD cards affects the speeds of the mSATA, while in my tests the mSATA drive performed slightly slower when OS was also booted from the same medium, the copy speeds make up for that difference.
I guess the benchmarks speak for itself. What’s even better, the Raspberry Pi 4 doesn’t drag an extension cable and it looks so much neater with an add-on board like this. Especially enclosed inside the Argon18 mod for Argon One case (review).
Not everything went smooth
The board was bought by me, and unfortunately, the 1st one arrived faulty. Upon closer inspection, an SMD component was missing (could be QA issue or damage in transport – I can’t tell). Geekworm agreed to send a replacement, but frankly speaking, I had to twist their arm a little. Not the most pleasant experience and they could have been more helpful in that matter. (I needed to mention AliExpress dispute to get the ball rolling).
The 2nd unit arrived without any issues free of charge. I’m not sure why they hesitated (after evidence submitted that the board is dead), it means that I issue a warning instead of recommending them based on the aftercare received. Faults happen, I’m a patient guy, but I expect the company to be accommodating if I decide to spend more time waiting. It’s the 1st time I ever had issues on AliExpress.
Quick Start: Format
If you just got a new mSATA drive and X857 mSATA for Raspberry Pi 4 add-on you will need to format the drive and create partitions. The process can be done in a terminal window thanks to
fdisk tool. List your drives with:
The drive will be likely available as
/dev/sdX device where
X will be your drive designation letter. Access the drive formatting tools with:
sudo fdisk /dev/sdX
If you already had partitions, you can delete these by typing
d, create a new partition with
n and configure as needed. You can save your new partitions with
w or quit without making changes with
q – hit
m if you need more help.
Now that you have your mSATA drive there is no reason not to boot it from USB! Try this guide out!
There is a reason why I’m writing about X857 mSATA for Raspberry Pi 4 card. Ever since I got my Argon ONE case (review) I had been thinking about a mod that would include the internal storage. Now that the boot from USB is developed enough, I can finally make this happen. This extension will go a long way making sure my server has no unnecessary cables sticking out. X857 mSATA for Raspberry Pi 4 isn’t designed for NAS drives (with multiple drives) but I have another board for that X829 Dual 2.5″ SATA for Raspberry Pi 4 (review). Let me know what do think about mSATA in this Reddit thread.