Build an Open Source NAS Server | SATA HAT expansion card for NanoPi M4V2
NanoPi M4 SATA HAT
FriendlyElec SATA HAT is an addon expansion card designed to provide SATA interfaces to the NanoPi M4V/2 SBC series. The extension board powered through the NanoPi M4V/2 header pins. And besides, the four SATA V3.0 interfaces and one power interface FriednlyElec also add few cool improvements such as power button, onboard fan power interface, two USB interfaces, and a secondary 12V power input interface so you can use a desktop computer PSU to power the NanoPi M4V/2 board.
For those interested in buying this board, the NanoPi M4 SATA HA is currently on sale for $25 on the official FriendlyElec website. It’s a very low-cost solution for existing and also new M4V/2 SBC owners interested in expending their board capabilities to the next level by building their own NAS server device. Then this is a great option worth considering.
- Compatible with NanoPi M4/V2
- Supported OS: FriendlyCore 18.04 64-bit, FriendlyDesktop 18.04 64-bit, and Lubuntu 16.04 32bit with Linux 4.4, Uboot-2014.10 for NanoPi M4.
- Marvell 88SE9215 four-port 6Gbps SATA I/O controller
- 2x 4-pin USB 2.0 host connectors
- NanoPi M4 40-pin header
- Power key, Power LED, 4x SATA LEDs
- 2-pin header for a fan, PWM modulation for 12V output
- Power Supply 12V DC input via power barrel jack or 4-pin header
- 4-pin SATA power connector with 12V and 5V output
- Additional Accessories: Heatsink, thermal pad, screws, posts, 2 SATA I/F, and SATA power cable.
All Items Packages
- 1x SATA HAT
- 1x Heatsink + thermal pad + two screws
- 2x SATA cables.
- 4x M2.5 Brass Hex M F Standoff, 4x screws.
- 1x SATA Power cable.
The SATA HAT is powered by Marvel 88SE9215-NAA2 chip series that are compliant with Serial ATA Specification 3.0 supporting communication speeds of 6.0 Gbps, 3.0 Gbps, and 1.5 Gbps. The kit includes an aluminum heatsink that sits on top of the Marvel chip to keep it cool under high heavy operation.
Assembling Both Boards
There are two main options to use the SATA HAT expansion card. If you didn’t buy the NanoPi M4/V2 heatsink unit, you could connect both boards using four Hex M F Standoff, and nuts also included with the kit. The ideal approach for best cooling is also to buy the big aluminium heatsink which provides excellent cooling for the CPU.
NanoPi M4/V2 Heatsink
NanoPi M4/V2 + SATA HAT (Without Heatsink)
To power the SATA HAT board along with the NanoPi M4/V2 SBC you would have to buy a power 12V-2A adapter.
SSD Speed Test
- SSD Model: SL700
- Brand: Lenovo
- Capacity: 480GB
- File system: NTFS
- Cache: independent cache
- Size: 2.5 inches
- Interface: SATA3
- Working temperature: 0 – 70 degrees
- Write speed: 540MB/s
- Reading speed: 450MB/s
Step#1 – Checking device storage information
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 447.1G 0 disk
└─sda1 8:1 1 447.1G 0 part
mmcblk1 179:0 0 14.5G 0 disk
└─mmcblk1p1 179:1 0 14.3G 0 part /
zram0 252:0 0 50M 0 disk /var/log
zram1 252:1 0 1G 0 disk [SWAP]
Step#2 – Formatting SSD to NTFS File system
Step#3 – Deactivating Cache
hdparm -W0 /dev/sda
Step#4 – Measuring the READ speed of the SSD device
/dev/sda with hdparm
root@nanopim4v2:~# sudo hdparm -Tt /dev/sda
Timing cached reads: 2668 MB in 2.00 seconds = 1334.43 MB/sec
Timing buffered disk reads: 1092 MB in 3.00 seconds = 363.95 MB/sec
Step#5 – Measuring the READ speed of the SSD device
/dev/sda with dd
root@nanopim4v2:/mnt/ssd# sudo dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 2.25947 s, 475 MB/s
Benchmark using GNOME Disks (Read/Write)
In this benchmark/stress test, we selected a 1G file size for the sample and let it run for a few minutes. The SSD was tested under Armbian Focal (desktop) mainline based on kernel 5.4.y. Overall test results were pretty impressive with average reading speeds of 338 Mb/s and write speeds of 401 Mb/s.
The SATA HAT for NanoPi M4V2 performed externally well. If you are considering building a small low power desktop computer / NAS server, then both boards combining with FriendlyElec aluminium Heatsink would be an excellent pick. An upper cover to close this semi-open case could also be a good idea. Perhaps made of plastic, just to cover the boards entirely and with few slots for adding additional USB ports.