Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Raspberry Pi OS now has SATA support built-in (jeffgeerling.com)
94 points by geerlingguy on July 30, 2021 | hide | past | favorite | 32 comments


> Sure you could always use hard drives and SSDs with SATA to USB adapters, but you [...] can't RAID them together, at least not without some hacks.

Why can't you RAID them together? The kernel doesn't care; all it wants to see are block devices. I recently recovered the files off a dead NAS by plugging the drives into USB adapters, and plugging those into a Raspberry Pi. RAID array assembled just fine.


Many applications won't allow the RAID to be set up over USB devices (e.g. Open Media Vault, IIRC), because software RAID over USB is prone to flakiness.


? pretty sure Open Media Vault on Raspberry Pi could setup a RAID with 2 USB hard drives, have been using it for almost 3 years.


USB Attached SCSI is the answer: https://en.wikipedia.org/wiki/USB_Attached_SCSI


>The Linux kernel has supported UAS since 8 June 2014 when the version 3.15 was released.However, some distributions of Linux such as Ubuntu (from v11.xx onwards) have suffered from issues with the implementation of the UAS protocol.

I assumed UASP is standard now, Every USB 3.0 or > storage devices, enclosures I've bought over past 5 years have supported it but it seems some Linux distros are still having trouble.

Searching for uas under ArchLinux ARM on Raspberry Pi 3 which is booted using a SSD drive with UASP enclosure returned nothing.


Nice file recovery. Have more details? Would be a useful blog post.


Maybe they meant hardware RAID?


The one thing that kept me away from the raspberry pi was that the sd card tends to fail after some time (hours to weeks). Now I just wait until the board gets built with a single sata slot.


I've had a similar frustration. For what it's worth, sending most logs to RAM drastically reduces the write-thrashing on the SD card, and greatly prolongs the life of a 24/7 Pi: https://github.com/azlux/log2ram

Depending on the use case, RAM disks are also pretty easy to set up for any temporary/volatile storage used by shell scripts and the like.


I've used various RPi's (and clones) for years now, and I've never had a SD card fail.

One RPi has been running my Home Assistant for 3 years 24/7, with a very noisy ZWave network that has debug logging on.

I had one where I _thought_ there was something weird going on with the SD card, but it turned out to be a crappy USB cable that lead to excessive voltage drop under load. Swapped the cable and it's been running my PiHole for over 2 years now on a standard Armbian+Docker install, zero issues.

Maybe I've just been lucky?


I purchased 2 Pi4s to run various small self-host services on. I've lost two SD cards in the course of about 6 months, and I've generally had stability problems with both of them, the hangs seem mostly tied to SD card and USB controller issues from what I can tell. I think my highest uptime is about 4 weeks. I'm not sure if it's heat or power related, or just bad SD cards, or general instability of the 4.

Regardless, I'm done monkeying with Pi 4s, and I'm moving to cost comparable PC Thin Clients for my self-hosting needs.

Never had any issues with several Pi3s over the years. They just don't have the oomph anymore for my needs.


It usually dies during an ungraceful shutdown. Had at least 3 go over the years until I switched to USB to SATA SSD boot. Not a problem since.


Standard Pi perhaps, but the official Pi Compute module supports sata. Geerlinguy did a nice writup about it.


Ebon has said specifically (in answer to my question in a Q&A) that the standard Pi will never have built in SATA. Your best option is one of the other manufacturers Pi type SBC clones.


Has the situation around booting from a USB-drive bettered for the Raspberry pi 4? Last time I tried, I couldn't figure out how to actually make it work.


Yes, I have a Pi4 booting off a SSD on a USB-SATA bridge. No SD card installed. This graduated from beta about a year ago. [1]

Btw, since you brought up USB: disable UAS [2] when using cheap USB-SATA bridges! UAS is regularly recommended for performance reasons, but I've gotten block-level errors (eg those below) and filesystem corruption with UAS multiple times and never with UAS disabled. I've seen enough similar reports on the Internet to think it's better to just disable UAS.

    Sep 22 17:26:01 nuc kernel: sd 4:0:0:1: [sdb] tag#2 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD OUT
    Sep 22 17:26:01 nuc kernel: sd 4:0:0:1: [sdb] tag#2 CDB: Write(16) 8a 00 00 00 00 01 4d b4 c4 00 00 00 03 b0 00 00
The Linux kernel has explicitly disabled UAS for some of these chipsets, but clearly not all of the offending ones. I'm not sure what you'd have to do to be confident your chipset is safe. I just don't think it's worth it.

[1] https://github.com/raspberrypi/documentation/commit/bfef967d...

[2] https://github.com/scottlamb/moonfire-nvr/wiki/System-setup#...


https://github.com/pftf/RPi4 allows you to store the UEFI firmware on the sd card. This enables you to not only boot from USB, but also PXE and even ISCSI


UEFI on an sd card -- that is so cool.


Yes - on the rpi4s, you can enable booting from usb devices directly using raspi-config, although raspbian is only 32 bit, so I wound up having to do a weird dance of using raspbian to enable usb boot and then installing ubuntu on the drive to get a 64bit OS


FWIW Raspbian has a 64 bit version in beta https://downloads.raspberrypi.org/raspios_arm64/images/raspi... the base image is outdated but you can full-system update from that point.

I'm the same way though, I just use a more typical distro unless there is something I need the standard toolset for.


Yeah, I’d seen the beta, but it looked like an early effort shortly abandoned - it didn’t inspire a lot of confidence.

Edit: although giving it a second glance, it looks like there’ve been a few updates: https://downloads.raspberrypi.org/raspios_arm64/images/


Note that Raspberry Pi OS also has a 64-bit beta version, and it's been extremely stable for me for months now.


I'll chime in that I've been using 64-bit raspberry pi OS for at least 8 months now and I haven't had any issues with it, other than a small snafu when I first tried to get Wireguard up and running but some of the base packages didn't yet support 64-bit OSes (I think?). That issue has since been fixed, I can happily report.



Be careful trying to boot 64 bit Ubuntu off a hard drive. You have to uncompress the kernel, or the boot will hang.


Does anyone know if booting off a USB stick instead of SD card will prevent my RPi 4 from crashing every ~1-3 days?


It's probably the power adapter that's at fault, not the SD card.


Mine runs fine for months on end. Things I did which might have helped: mount /tmp in a ramdisk and have an enclosure with good passive cooling


Isn’t /tmp always mounted in ram these days or is that distro specific?


Raspberry Pi OS == Linux


Yes, but Linux is not Raspberry Pi OS. Linux has had support for SATA for a very, very long time, but Raspberry Pi OS was not compiled with the relevant option enabled and so did not have SATA support originally.


You know you get downvoted for connecting Raspberry Pi users with reality, right?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: