Pi.BerkeleyLUG: USB drives on Raspberry Pi

0 views
Skip to first unread message

tom r lopes

unread,
Jul 8, 2020, 8:30:00 AM7/8/20
to berke...@googlegroups.com
This last weekend at sf-lug meeting Rick Moen mentioned a Pi-like 
board with an actual pci-express port (!)  
You could place a SATA controller in that slot and make yourself 
a small file server.  

So people have been hanging USB 3 drives off the Pi 4 and making 
file servers that way.  
I just discovered that USB 3 drives are accessed in Linux via two 
different drivers "uas" (USB Attached Scsi) and "usb-storage"  
And there is quite a difference between the two:  

So looking at the drives I have:  

tom@tom-desktop:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   3.7T  0 disk
├─sda1   8:1    0     1T  0 part /mnt/steam
└─sda2   8:2    0     1T  0 part
sdb      8:16   0 931.5G  0 disk
└─sdb1   8:17   0 931.5G  0 part
sdc      8:32   0 238.5G  0 disk
├─sdc1   8:33   0   190M  0 part /boot/efi
├─sdc2   8:34   0 111.8G  0 part /
├─sdc3   8:35   0   7.5G  0 part [SWAP]
└─sdc4   8:36   0 119.1G  0 part
sdd      8:48   0 931.5G  0 disk
└─sdd1   8:49   0 931.5G  0 part /media/tom/Toms 1TB
sde      8:64   0   4.6T  0 disk
└─sde1   8:65   0   4.6T  0 part /media/tom/Tom's Passport


tom@tom-desktop:~$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 3: Dev 9, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
    |__ Port 4: Dev 8, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
        |__ Port 5: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 5: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 5: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 6: Dev 4, If 2, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 6: Dev 4, If 0, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 6: Dev 4, If 3, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 6: Dev 4, If 1, Class=Audio, Driver=snd-usb-audio, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
        |__ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
        |__ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M

sdd is a 1TB 2.5in SATA drive connected through an Anker SATA to USB 3 adapter
and it uses "uas" : |__ Port 4: Dev 8, If 0, Class=Mass Storage, Driver=uas, 5000M

sde is a 5TB WD Passport 2.5in external USB and it uses "usb-storage"  
|__ Port 3: Dev 9, If 0, Class=Mass Storage, Driver=usb-storage, 5000M 

I was thinking of using the 5TB with the PI but now I think it may not be the 
best.  Not too many options there.  The USB interface on the Passport drives 
is built in -- there is no SATA inside.  

Also I come to find out the Passport is one of the dreaded SMR drives:  
Though I am not really expecting to do a zfs raid on a Pi4 

uas vs usb-storage is also a factor in the new USB boot firmware (well I think it is 
still in beta)  Some are finding the PI won't boot from a drive detected as uas.  


Thomas

Rick Moen

unread,
Jul 8, 2020, 11:23:38 PM7/8/20
to berke...@googlegroups.com
Quoting tom r lopes (tomr...@gmail.com):

> So people have been hanging USB 3 drives off the Pi 4 and making
> file servers that way.

Long story short: In my considered view, and that of many longtime
server admins, USB is simply too flaky and too slow to be desirable for
main server storage[1]. And that thus also applies to things like Anker
USB 3.0-to-SATA converter widgets[2], with or without a USB Attached
SCSI Protocol (UASP) software overlay.

If you've not worked with anything better than USB-attached devices for
connections to main storage, it seems great. Once you've done systems
using reliable, fast attachment hardware protocols, you tend to think
'Eh, let's try to avoid doing that other thing again.'


[1] As I've also clarified elsewhere, my term '_main_ storage' is in
contradistinction to detachable occasional storage such as ancillary
external storage or backup-target drives. Or optical drives, or similar
things. USB's IMO easily good enough for that; better hotpluggable
attachments exist but are rather more expensive and exotic.

By contrast, SATA/eSATA/M.2/SAS attachments inherit the general
characteristics of ATA & parallel SCSI, being based on them and (like
them) designed for main storage.


[2] Bridging USB to SATA leaves it _still_ flaky and slow, because it's
still USB. Ditto using an external drive reached over USB that has a
SATA connection between the storage device and the case. That's still
USB, too. Seriously.

Reply all
Reply to author
Forward
0 new messages