12 12
manuti

Orange Pi Zero NAS Expansion Board with SATA & mSATA

Recommended Posts

Little update on the NAS Expansion board: the first time I had this thing in my hands and gave it a try with mainline kernel I was surprised why the JMS578 chips on the board did not allow to use UAS. It looked always like this (lsusb -t):

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M

With no other JMS578 device around I experienced this and since I'm currently testing with Orange Pi Zero Plus (still no UAS) and In the meantime JMicron provided us with a firmware update tool.... I thought I take the slightly higher JMS578 firmware revision from ROCK64 SATA cable (0.4.0.5) and update the NAS Expansion board (0.4.0.4) with:

root@orangepizeroplus:~/JMS578FwUpdater# ./JMS578FwUpdate -d /dev/sda -v
Bridge Firmware Version: v0.4.0.4
root@orangepizeroplus:~/JMS578FwUpdater# ./JMS578FwUpdate -d /dev/sdb -v
Bridge Firmware Version: v0.4.0.5
root@orangepizeroplus:~/JMS578FwUpdater# ./JMS578FwUpdate -d /dev/sdb -b ./JMSv0.4.0.5.bin
Backup Firmware file name: ./JMSv0.4.0.5.bin
Backup the ROM code sucessfully.
Open File Error!!
root@orangepizeroplus:~/JMS578FwUpdater# ./JMS578FwUpdate -d /dev/sda -f ./JMSv0.4.0.5.bin -b ./JMSv0.4.0.4.bin
Update Firmware file name: ./JMSv0.4.0.5.bin
Backup Firmware file name: ./JMSv0.4.0.4.bin
Backup the ROM code sucessfully.
Programming & Compare Success!!

Success!

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 480M

Please keep in mind that you need to update both JMS578 of course. I won't upload the newer firmware yet since thanks to Pine's TL Lim I'm in direct contact to JMicron now and it's about fixing another JMS578 firmware issue.

Share this post


Link to post
Share on other sites

Got some nice feedback from JMicron explaining firmware versions.

  • 0.1.x is for self-powered SATA HDD/SSD device
  • 0.2.x is for bus-powered SATA HDD/SSD device 
  • 0.4.x is for self-powered SATA HDD/SSD/ODD device application (ODD --> optical disk)
  • $higher-number.x means custom firmware (enclosure maker)

I only asked for the firmware revisions of a couple of devices I've access to so not all possible variations are listed above (eg. 0.3.x or 0.5.x could mean 'bus-powered HDD/SSD/ODD device). But at least this explains a lot already.

 

When comparing 0.1.0.5 on ODROID HC1 and 0.4.0.5 with ROCK64 SATA cable the firmware revision (x.x.0.5) is the same while the ROCK64 cable firmware should also deal with optical drives. And the 0.2.x firmware being meant for bus-powered vs. self-powered suddenly explains the different behaviour I observed wrt JMS chip being present on the USB bus or not depending on whether there's a SATA drive connected or not (different consumption in different modes).

 

Anyway that needs some more understanding and testing but at least we don't need to be concerned about one JMS578 device (ODROID HC1) having a horribly outdated firmware 0.1.0.5 while ROCK64 SATA cable has a way higher (0.4.0.5) since FW revision is actually the same. :)

 

JMicron is still busy testing with a newer firmware revision solving the HDD spindown issues, once I get news or something to test I'll update this thread.

Share this post


Link to post
Share on other sites

Since I prepare a little NAS test with Orange Pi Zero Plus today I upgraded the firmware of the other JMS578 on the NAS Expansion board. Side effect: with the more recent firmware the USB-to-SATA bridge also provides more real information from the connected disk instead of itself.

 

Prior to the firmware upgrade only /dev/sda shows nice information:

Bildschirmfoto%202017-11-16%20um%2018.09

 

After I upgraded the 2nd JMS578 (needs a full shutdown and removing power after the upgrade!) now /dev/sdb also reveals more information (though the drive's serial still bogus):

Bildschirmfoto%202017-11-16%20um%2018.17

Share this post


Link to post
Share on other sites
On 03/04/2017 at 11:28 AM, tkaiser said:

Sure can you put NEO 2 onto that board, it's just a different front panel that's needed since for whatever reasons the Ethernet jack on NEO 2 has been moved by a few mm

The NanoPi Neo Station NS-120B Case will be delivered with two different front plates :) For Neo and Neo2!

 

 

NeoNAS_Frontplate.jpg

Share this post


Link to post
Share on other sites
1 hour ago, tkaiser said:

The new firmware release should provide full SAT support (so we can directly talk to the disk and apply spindown settings there, also hdparm should report the drive's state correctly now). Also TRIM is now reported to work. Feedback welcome.

couldnt test with my OPi-R1 because I didnt got a SATA-device on my OPi-R1:

root@orangepi-r1:/home/guido/jms/JMS578FwUpdater# ./JMS578FwUpdate -v
JMicron Firmware Update Tool v0.0.0.1
Copyright (C) 2017 JMicron Corp.

root@orangepi-r1:/home/guido/jms/JMS578FwUpdater# ./JMS578FwUpdate -d /dev/sda -v
ERR : open device fail
Get Bridge version FAIL!

 

Share this post


Link to post
Share on other sites

Updated from

Bridge Firmware Version: v0.4.0.4

to

Bridge Firmware Version: v173.1.0.1

 

smartmontools (smartctl) seems to work with "-d sat" option, unfortunately didn't test this before the upgrade and don't have anything to plug into mSATA to test the second bridge which still has the old firmware.

hdparm -Y works (though it worked before too), hdparm -C seems to not work after the drive was put into sleep mode (hdparm -Y)

root@orangepizeroplus:~# hdparm -C /dev/sda

/dev/sda:
SG_IO: bad/missing sense data, sb[]:  70 00 02 00 00 00 00 0a 00 00 00 00 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 drive state is:  unknown
root@orangepizeroplus:~#

but works in active/idle mode

root@orangepizeroplus:~# hdparm -C /dev/sda

/dev/sda:
 drive state is:  active/idle
root@orangepizeroplus:~#

End of dmesg after playing with hdparm

[  406.001418] sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD
[  406.001437] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x85 85 06 20 00 00 00 00 00 00 00 00 00 00 40 e6 00
[  435.195712] sd 0:0:0:0: tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD
[  435.195729] sd 0:0:0:0: tag#1 CDB: opcode=0x0 00 00 00 00 00 00
[  435.195767] scsi host0: uas_eh_device_reset_handler start
[  435.327760] usb 5-1: reset high-speed USB device number 2 using ehci-platform
[  435.537013] scsi host0: uas_eh_device_reset_handler success
[  435.537254] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x0e
[  435.537266] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x0 [current] [descriptor]
[  435.537274] sd 0:0:0:0: [sda] tag#0 ASC=0x0 ASCQ=0x1d
[  435.537286] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x85 85 06 20 00 00 00 00 00 00 00 00 00 00 40 e6 00
[  652.154635]  sda: sda1 sda2 < sda5 >

 

Share this post


Link to post
Share on other sites
On 12/5/2017 at 10:18 AM, tkaiser said:

Testers wanted: https://wiki.odroid.com/odroid-xu4/software/jms578_fw_update

 

The new firmware release should provide full SAT support (so we can directly talk to the disk and apply spindown settings there, also hdparm should report the drive's state correctly now). Also TRIM is now reported to work. Feedback welcome.

 

I posted already over here:

but here should be the right place...

 

My Firmware is 0.2.0.4 (so it's a bus-powered SATA HDD/SSD device) and looks like this: USB3-HD-Case

 

HTB1HpFzSVXXXXXkaFXXq6xXFXXX7.jpg.9552ced69c62b8cf6246c6584e154bb0.jpg

 

Right now (FW: 0.2.0.4) I have the following outputs:


 

Information in OMV (armbian build) is given and correct. SMART-DATA is also available inside of OMV without any tweaking.

 

omv_usb3.png.ebe4ac8477235e35ace26a0365d1d2c2.png

 

 

UAS looks active for me:

Quote

lsusb -t

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 480M

 

Just the power management seems to be off track

 

Quote

hdparm -C /dev/sda

/dev/sda:
SG_IO: bad/missing sense data, sb[]:  70 00 01 00 00 00 00 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 drive state is:  unknown

 

 

Anything else I can test before doing the firmware upgrade?

 

Share this post


Link to post
Share on other sites
On 12/10/2017 at 1:34 PM, finally said:

 

I posted already over here:

but here should be the right place...

 

My Firmware is 0.2.0.4 (so it's a bus-powered SATA HDD/SSD device) and looks like this: USB3-HD-Case

 

HTB1HpFzSVXXXXXkaFXXq6xXFXXX7.jpg.9552ced69c62b8cf6246c6584e154bb0.jpg

 

Right now (FW: 0.2.0.4) I have the following outputs:


 

Information in OMV (armbian build) is given and correct. SMART-DATA is also available inside of OMV without any tweaking.

 

omv_usb3.png.ebe4ac8477235e35ace26a0365d1d2c2.png

 

 

UAS looks active for me:


/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 480M

 

Just the power management seems to be off track

 


/dev/sda:
SG_IO: bad/missing sense data, sb[]:  70 00 01 00 00 00 00 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 drive state is:  unknown

 

 

Anything else I can test before doing the firmware upgrade?

 

 

Just an update. I did it - finally. And it works!

 

First. This one here didn't work (afterwards with: power off - remove cable - wait - attach cable - power on)

 

Quote

./JMS578FwUpdate -d /dev/sda -f JMS578_Hardkernel_v173.01.00.01.bin

Update Firmware file name: JMS578_Hardkernel_v173.01.00.01.bin
Open Backup File Error!!

 

Second round did it (also afterwards with: power off - remove cable - wait - attach cable - power on)

Quote

./JMS578FwUpdate -d /dev/sda -f JMS578_Hardkernel_v173.01.00.01.bin -b backup.bin

Update Firmware file name: JMS578_Hardkernel_v173.01.00.01.bin
Backup Firmware file name: backup.bin
Backup the ROM code sucessfully.
Programming & Compare Success!!

And here we go. fresh version:

Quote

./JMS578FwUpdate -d /dev/sda -v

Bridge Firmware Version: v173.1.0.1

 

And the best:

 

Quote

 hdparm -C /dev/sda

/dev/sda:
 drive state is:  active/idle

:)

 

Just one thing has changed: (now data from the bridge is taken)image.png.358df8d45ce3ce03515b63106b1b5b3e.png

compared to before (where the data from disk was retrieved)

omv_usb3.png.ebe4ac8477235e35ace26a0365d1d2c2.png

Share this post


Link to post
Share on other sites

I've been looking at this expansion board for a while now, but I'm still undecided.
My first question is: what is the maximum physical size of mSata drives that we can put on the expansion board? 30mmx50mm, 2.5'?

What part of the system can we host on this extension? Anything but boot? I guess the Zero can't boot on that?

 

For the time being, the Zero I'd like to upgrade is a gitlab-runner (building ARM binaries and Docker images). I'm not really concerned about speed, but about having a stable solution (no degrading SDCard performance) and a way to swap without killing the storage media.

Thanks.

Share this post


Link to post
Share on other sites
19 minutes ago, gounthar said:

what is the maximum physical size of mSata drives that we can put on the expansion board?

 

mSATA defines two sizes and both fit. Each JMS578 chip on the expansion board is just like an 'external USB disk' so all the information available talking about USB disks also applies to the situation here. If your Zero has SPI NOR flash and you manage to burn u-boot into it you can load everything else from USB. But this requires you doing some research and is not automated by nand-sata-install (what a stupid name these days).

 

If there's something I would put my swap on it would be the fastest storage available (especially wrt random IO). On those USB2 boards without superfast eMMC that's always an UAS attached SSD.

 

Compare here with there:

  • Close to 3,000 4K IOPS with a good SSD behind a good USB-to-SATA bridge (like JMS578) behind an Allwinner USB2 port
  • A SanDisk Extreme A1 SD card behind a standard (bottlenecked) DDR50 SDIO controller only scores ~1000/~2500 4K IOPS. It would need a better SDIO interface mode for better performance but that's nothing any of those cheap Allwinner boards provides
  • On boards with super fast eMMC this is also an option. Recent Samsung 5.1 eMMC provides +7000 4K IOPS (see ODROID-N1 numbers -- you have to divide numbers through block size to translate from KB/s to IOPS)

If you avoid cheap crap SSDs it's 100% save to use them since unlike SD cards or USB pendrives you can query them about their health and replace them before they finally die. The magic word is SMART: https://forum.openmediavault.org/index.php/Thread/23724-Run-OS-and-database-on-SD-card-to-prevent-HDD-spin-up/?postID=180003#post180003

Share this post


Link to post
Share on other sites
(edited)

hello dear folks

 

i own a Orange Pi


- pc
- prime

 

question: does the  Orange Pi NAS Expansion card (also know as Orange-Pi-Zero-NAS-Expansion-board-Interface-board )
fit to these above mentioned boards too

 

look forward to hear from you

 

greetings

Edited by malaga

Share this post


Link to post
Share on other sites

No ! The header are not the same, the one used on OPiZ provides an USB bus to attached the NAS hub.

Of course, with wires, you could probably make manual connections to existing USB to make it work ...

Share this post


Link to post
Share on other sites
4 hours ago, martinayotte said:

No ! The header are not the same, the one used on OPiZ provides an USB bus to attached the NAS hub.

the OPi Zero header is also available on the OPi R1 ;)

Share this post


Link to post
Share on other sites

Resurrecting old thread... I have an Orange Pi Zero Plus (which seems to be a simple 64-bit update to the Zero), and am trying to use the NAS board with it.  Unfortunately, I am not seeing the USB->SATA bridge get probed.  Are there any DTS changes needed to enable the board?  Has anyone else experienced this issue?

Share this post


Link to post
Share on other sites
1 hour ago, thorpej said:

Resurrecting old thread... I have an Orange Pi Zero Plus (which seems to be a simple 64-bit update to the Zero), and am trying to use the NAS board with it.  Unfortunately, I am not seeing the USB->SATA bridge get probed.  Are there any DTS changes needed to enable the board?  Has anyone else experienced this issue?


armbian-config -> system -> hardware and enable additional usb ports.

Share this post


Link to post
Share on other sites

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.

Loading...
12 12