Is SATA working on any of the M3 images?

Hello,

I tried all 3 Linux images on the M3. On none of them i could see my SATA disk. Anyone managed to see the disk via the SATA port? USB works though… but i need SATA (not for speed reasons, for other reasons)

Thanks, Vlad.

The M3 has no SATA, just an onboard GL830 USB-to-SATA bridge.

If USB works then a disk should work. If it’s not working you loose exactly nothing by accessing a disk through an USB enclosure. It will be as slow as with ‘onboard’ USB-to-SATA.

Hello,

Thank you for your answer. I need to work with the SATA connector since i used it with an enclosure. I don’t care about the speed, can be USB speed, but i need the SATA connector. Seams is not working, any idea? Anyone tried?

I just connected an EVO 840. The polarity of the SATA power connector is the same as with other Banana and Orange Pis (therefore not compatible to Linksprite und Cubietech):

[   11.624803] scsi 0:0:0:0: Direct-Access     Samsung  SSD 840 EVO 120G 0016 PQ: 0 ANSI: 4
[   11.637009] EXT4-fs (mmcblk0p2): re-mounted. Opts: errors=remount-ro
[   11.649766] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   11.650373] sd 0:0:0:0: [sda] 234441644 512-byte logical blocks: (120 GB/111 GiB)
[   11.651362] sd 0:0:0:0: [sda] Write Protect is off
[   11.651370] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[   11.652362] sd 0:0:0:0: [sda] No Caching mode page present
[   11.652369] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.655232] sd 0:0:0:0: [sda] No Caching mode page present
[   11.655239] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.669043] Alternate GPT is invalid, using primary GPT.
[   11.669093]  sda: sda1 sda2
[   11.748603] sd 0:0:0:0: [sda] No Caching mode page present
[   11.758588] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.769226] sd 0:0:0:0: [sda] Attached SCSI disk

SAT/SMART works also (small exception below):

root@BPiM3:~# smartctl -a /dev/sda
smartctl 6.4 2014-10-07 r4002 [armv7l-linux-3.4.39-BPI-M3-Kernel] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     Samsung SSD 840 EVO 120GB

...

=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

Currently I’m testing performance using iozone (will take some time). And no, I’m not using any of the ‘official’ images but created my own. This is necessary since all 3 linux images are corrupted and they started just recently to fix important stuff. You can use the Raspbian image as a skeleton, clone their M3-BSP and compile the stuff and then combine both: http://linux-sunxi.org/User_talk:Tkaiser#First_steps_with_Banana_Pi_M3

I got 13MB/s sequential writes and 23MB/s sequential reads from a fast SSD. That means a ‘slow’ A20 board like the Banana Pi M1 is 2-3 times faster when accessing USB storage and 3.5-10 times when using SATA.

Just tried it with a 3TB Seagate Barracuda to get a clue whether the GL830 chip suffers from a 2TB limitation or not (a question 100 times discussed here in the forums without a single answer from SinoVoip). It seems to work:

[   11.564937] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   11.565654] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[   11.566156] sd 0:0:0:0: [sda] 5860533164 512-byte logical blocks: (3.00 TB/2.72 TiB)
[   11.566165] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   11.567180] sd 0:0:0:0: [sda] Write Protect is off
[   11.567192] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[   11.568151] sd 0:0:0:0: [sda] No Caching mode page present
[   11.576608] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.586772] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[   11.588893] sd 0:0:0:0: [sda] No Caching mode page present
[   11.597359] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.629587] Alternate GPT is invalid, using primary GPT.
[   11.629652]  sda: sda1 sda2 sda3 sda4
[   11.631650] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[   11.633769] sd 0:0:0:0: [sda] No Caching mode page present
[   11.642356] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.651583] sd 0:0:0:0: [sda] Attached SCSI disk

root@BPiM3:~# parted -s /dev/sda mklabel gpt
root@BPiM3:~# SectorCount=$(parted -s /dev/sda unit s print | awk -F": " '/^Disk \/dev\/sda/ {print $2}' | tr -d 's')
root@BPiM3:~# LastUsableSector=$(( ${SectorCount} / 2048 ))
root@BPiM3:~# parted -s /dev/sda --align optimal unit s mkpart primary ext4 2048 $(( ${LastUsableSector} * 2048 ))
root@BPiM3:~# mkfs.ext4 /dev/sda1
mke2fs 1.42.12 (29-Aug-2014)
Creating filesystem with 732566272 4k blocks and 183148544 inodes
Filesystem UUID: a111af39-98c5-40ac-8b28-1539d1da6760
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done       

root@BPiM3:~# cat /proc/partitions 
major minor  #blocks  name

 179        0    7761920 mmcblk0
 179        1      51200 mmcblk0p1
 179        2    5242880 mmcblk0p2
 179       16    7634944 mmcblk1
 179       17    5025792 mmcblk1p1
 179       18      16384 mmcblk1p2
 179       19          1 mmcblk1p3
 179       21      16384 mmcblk1p5
 179       22      16384 mmcblk1p6
 179       23    1572864 mmcblk1p7
 179       24      16384 mmcblk1p8
 179       25      32768 mmcblk1p9
 179       26     786432 mmcblk1p10
 179       27      16384 mmcblk1p11
 179       28      16384 mmcblk1p12
 179       29      81920 mmcblk1p13
 179       48       4096 mmcblk1boot1
 179       32       4096 mmcblk1boot0
   8        0 2930266582 sda
   8        1 2930265088 sda1

root@BPiM3:~# mount /dev/sda1 /mnt/sda1
root@BPiM3:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       5.0G  3.6G  1.2G  76% /
devtmpfs        751M     0  751M   0% /dev
tmpfs          1007M     0 1007M   0% /dev/shm
tmpfs          1007M   18M  989M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs          1007M     0 1007M   0% /sys/fs/cgroup
tmpfs          1007M  4.0K 1007M   1% /tmp
/dev/mmcblk0p1   50M     0   50M   0% /media/boot
tmpfs           202M     0  202M   0% /run/user/108
tmpfs           202M     0  202M   0% /run/user/1000
/dev/sda1       2.7T  201M  2.6T   1% /mnt/sda1

But then I started a simple iozone run to test performance and the whole system stalls. Further investigation needed. The same set of tests with a small 120GB SSD ran flawlessly.

Thank you for the insightful answer! Would it be possible to try your image to see it i can see any SATA disk with my board? I am using a 2TB disk just to play it safe, but it still does not see any device /dev/sda unless i use a USB connected disk and then works very well.

Also as a side note i always use separate power for any HDD (SATA or USB) because will reduce the thermal stress of the board.

Anyhow now i want to know is the image is broken or my SATA bridge is not working.

Vlad

Easy: Your SATA bridge is broken :smile:

This is good news since this is the worst connection method possible (did some more measurements today)

I would like to try the same image you tried before i conclude the HW is defect. How big it is?

I created an image on my own since a few days ago SinoVoip only provided broken OS images (their most recent are also ‘broken’ somewhat since they enabled irqbalanced – you’ll read in a few weeks about this when the forum will be full of stability issues :joy:)

My image needs an 8 GB SD card since I had to expand the rootfs to be able to test the speed of the SDIO implementation:

http://linux-sunxi.org/Banana_Pi_M3#Images

I realise this is an old thread. If anyone is still trying to get a stable OS with Sata support working I’ve been using a Raspbian image with a 3TB drive connected without any issues for over 2 years.

I downloaded the Raspbian image from here. install-raspbian-on-banana-pi-m3