Can I power two usb drives using USB to satas or do i need a powered USB hub?
The Pi3B+ can supply up to 1.2A total across the 4 USB ports. See Raspberry Pi Power Limitations.
This assumes the Pi power supply is adequate.
Whether this would be adequate for 2 SSD drives, depends on the drives. My experience is that the voltage from the USB ports often falls below that required for power hungry external drives, so a powered hub is desirable.
For connecting two USB SSD/HDDs, does an Rpi USB Hub need any external power?
Update for Rpi4B buster 2020apr16
Soon after my 2019jul answer below, I upgraded from Rpi3B+ to Rpi4B, with 1/2/4G RAM, and successive releases of buster (now Release 2020feb). I am happy to update my SSD report that so far as good.
I measured the idle current and write current of a 1TB SSD, and a2TB HDD.
SSD's idle current is 0mA, and write current around 180mA
HDD's idle (spinning) current is 170mA, and write current 200mA ~ 380mA
My conclusion is that for hobbyist's python programming projects with casual use of SSD or HDD, there is no need to supply external power to the USB hub. If two SSDs are used for professional projects, it is better to supply external power to the USB hub.
One very good thing about SSD is that it is like a 1TB SD card or 1TB USB stick, there is no need to mount or unmount the HDD. (And SSD's speed of around/up to 500MB/s is 10 times higher than micro SD card!) *Rpi Stretch 9 entertains SSD just like SD card and USB stick, with eject option at the top right corner. So I am going to throw my HDDs into the junk box, and buy more SamSung T5 (250GB should be most cost effective for hobbyists) for my other Rpi3/4s.
Well, it also depends on your SSD/HDD's power requirements. For reference, let me describe how I am using one 2.5", 5,400 rpm, 2TB SeaGate Backup Plus Model SRD00F1 HDD, as shown in the picture below.
I will then consider SSDs which has a much less power requirements.
The popular Seagate Backup Plus HDD series has 1/2/4/5TB versions, and power requirements is within 2W (peak). In other words, the maximum current is around 500mA.
I first tested the HDD using an USB hub without external power, on both Win10 PC and Rpi3B+. I found the following current measurements.
Idle (spinning) current ~= 170mA
Startup and working current ~= 200mA ~ 380mA
I mainly use the HDD for backing up my Rpi Micky Mouse project' python programs, with a total size of much less than 1MB a week. In other words, I only use the backup HDD for perhaps 10 minutes each couple of days. I mostly use an 16GB USB stick for frequent everyday backup, perhaps 10 times an evening.
In order not to draw unnecessary power from the Rpi USB power source, heating up the Rpi, I am doing the following.
I am using a 4 channel USB hub with individual on/off switches, and I switch on power for the USB HDD only when I am going to do backing up, therefore saving 170mA idle current.
I also don't automatically mount the HDD during boot time. I only mount the HDD before backup up, and unmount immediately after backing up. This way avoids carelessly unplugging or freezing Rpi, corrupting the HDD.
I found using one Segate 2TB HDD using USB Hub without external power is good enough for my hobbyist projects.
Of course if I am doing more serious work, using more than two 5TB HDDs say, I will definitely use an externally powered hub.
SSD Power Requirements
SamSung T5 SSD 250GB/500GB/1TB/2TB = 5V 800mA
/ to continue, ...
Appendix A - Newbie friendly Rpi HDD config notes
Part A - Partition and Format USB Hard Disk
Chinese Windows 10 > Control Panel > System and Security > Partition and Format Hard Disk
Part B - Rpi External Hard Disk Installation
# List partitions on hard disk $ sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL # To find locaction hard disk partition (would find /dev/dsa1) $ sudo blkid # Crete mount point name "mydisk" $ sudo mkdir /mnt/mydisk
Part C -To set hard disk permissions
$ sudo chown pi:pi /mnt/mydisk $ sudo chmod 777 /mnt/mydisk
Part D - To mount and umount hard disk
$ sudo mount /dev/sda1 /mnt/mudisk $ sudo umount /mnt/mydisk
Part F - Install exfat and ntf drivers
$ sudo apt-get update $ sudo apt-get install exfat-fuse $ sudo apt-get update $ sudo apt-get install ntfs-3g
Appendix B - Samsung USB3.1 1TB SSD T5 (MU-PA1T0B/AM) Features
Read-Write speeds of up to 540 MB/s
Top to bottom metal design that fits in the palm of your hand
Optional password protection and AES 256-bit hardware encryption
Includes USB Type C to C and USB Type C to A cables
SamSung T5 SSD 250GB/500GB/1TB/2TB Rating = 5V 800mA
Appendix C - Samsung T5 1TB SSD Setup Notes
The T5 SSD is preformatted using exFAT file system. Windows 10 can readily read and write.
Rpi3B+ Stretch 9 already installed for HDD using the following command: $ sudo apt-get update $ sudo apt-get install exfat-fuse immediately detects T5. No mounting is required.
When using exFAT across multiple operating systems, data writing may become locked and you may only be able to read data. If such problem occurs, you can restore write access by following the instructions below.
Windows OS: When the notice pops up saying that write access is disabled, click “Scan and fix” to perform Check Disk (CHKDSK). If you did shut down the notice without performing Check Disk, you may do it by selecting the drive → Right-click → Properties → Tools → click Check.
Appendix D - uuid, fstab, and auto mounting notes
The fstab (or file systems table) file is a system configuration file commonly found at /etc/fstab on Unix and Unix-like computer systems. In Linux it is part of the util-linux package.
The fstab file typically lists all available disk partitions and other types of file systems and data sources that are not necessarily disk-based, and indicates how they are to be initialized or otherwise integrated into the larger file system structure.
The fstab file is read by the mount command, which happens automatically at boot time to determine the overall file system structure, and thereafter when a user executes the mount command to modify that structure. It is the duty of the system administrator to properly create and maintain the fstab file.
While fstab is still used for basic system configuration, for other uses it has been superseded by automatic mounting mechanisms.
/ to continue, ...