News for hackers. Stuff that matters.
Re:Raspberry Pi 4 by kyriakos on Monday June 24, 2019 @02:56AM (#20261111)
RPI would be awesome for NAS if you could connect SATA somehow
Re:Raspberry Pi 4 by tmikaeld on Monday June 24, 2019 @03:10AM (#20261184)
The USB 3.0 ports should give 100MB/s (Benchmarks show up to +300MB/s), and you can mirror two disks for RAID-1.

With 4GB of RAM, you'd even be able to use ZFS.

Re:Raspberry Pi 4 by morphle on Monday June 24, 2019 @04:08AM (#20261425)
not these USB 3.0 ports. Connected with shared 4 Gbps, they only run at 4/5th, 1/2 or less of the full 5 Gbps speed.
Re:Raspberry Pi 4 by tmikaeld on Monday June 24, 2019 @05:47AM (#20261844)
Which means, 2 ports and two drives (not ssd) should give at least 100MB/s each. Maybe I wasn't clear enough on that.

- 1Gbit ethernet

- 1Gbit USB 3.0 port 1

- 1Gbit USB 3.0 Port 2

Total: 3Gbit of 4Gbit, having some margin to spare.

Re:Raspberry Pi 4 by fanf2 on Monday June 24, 2019 @06:39AM (#20262075)
The Ethernet is directly connected to the SoC, it doesn't share the 4Gbit PCIe with the USB ports
Re:Raspberry Pi 4 by dotancohen on Monday June 24, 2019 @08:02AM (#20262611)
On the older RPIs the ethernet was connected via the USB ports, so I understand GP's stance.
Re:Raspberry Pi 4 by morphle on Monday June 24, 2019 @09:00AM (#20263097)
It has:

1 Gbit Ethernet over RGMII

4 Gbit PCIe Gen 2 shared by 2 USB 3.0 (so 1x 4 gbps max or 2 x 2 Gbps shared)

Total: 5 Gbits, no margin to spare

Re:Raspberry Pi 4 by kllrnohj on Monday June 24, 2019 @12:38PM (#20265414)
> or 2 x 2 Gbps shared

Only if both drives are saturated at the same time. But since the context here is a NAS usage, there's a max 1gbps upstream/downstream in the first place so you could comfortably do a 4 drive mirror NAS off of this and not have any bottlenecks on the USB 3.0 -> SATA side of things.

Re:Raspberry Pi 4 by Maledictus on Monday June 24, 2019 @10:28AM (#20263829)
I tried ZFS with 4 GiB RAM in the past and it was not fun. Does it work for you?
Re:Raspberry Pi 4 by tmikaeld on Monday June 24, 2019 @02:13PM (#20266584)
I have several 4GB machines that's used in production (ZFS on Linux), however, it's not problem free and require lot's of tuning, the correct workload and smaller sizes of disks.

A guide: https://wiki.freebsd.org/ZFSTuningGuide

Re:Raspberry Pi 4 by chongli on Monday June 24, 2019 @05:58AM (#20261883)
With 4GB of RAM, you'd even be able to use ZFS.

Does it use ECC memory? If not, you should not use ZFS. Without ECC memory, ZFS carries the nasty risk of writing good data with a bad checksum, leading to data loss which would not occur in other filesystems (those that do not try to correct errors on the fly like ZFS).

Re:Raspberry Pi 4 by TheAceOfHearts on Monday June 24, 2019 @07:06AM (#20262203)
As I understand it, this is just a myth. Here's a post [0] from Matthew Ahrens, one of the co-founders of ZFS who has remained active in its development:

> There's nothing special about ZFS that requires/encourages the use of ECC RAM more so than any other filesystem. If you use UFS, EXT, NTFS, btrfs, etc without ECC RAM, you are just as much at risk as if you used ZFS without ECC RAM. Actually, ZFS can mitigate this risk to some degree if you enable the unsupported ZFS_DEBUG_MODIFY flag (zfs_flags=0x10). This will checksum the data while at rest in memory, and verify it before writing to disk, thus reducing the window of vulnerability from a memory error.

[0] https://arstechnica.com/civis/viewtopic.php?p=26303271#p2630...

Re:Raspberry Pi 4 by flyinghamster on Monday June 24, 2019 @10:25AM (#20263790)
> Actually, ZFS can mitigate this risk to some degree if you enable the unsupported ZFS_DEBUG_MODIFY flag (zfs_flags=0x10).

Ooooo, I hadn't heard about that one. I have one non-ECC box running ZFS where I might want to enable this. If the performance impact is negligible, it'd be worth trying.

Re:Raspberry Pi 4 by msiebuhr on Monday June 24, 2019 @07:15AM (#20262252)
Without ECC memory, ZFS carries the nasty risk of writing good data with a bad checksum, leading to data loss which would not occur in other filesystems

Assuming a memory error somewhere:

On ZFS you'd be writing bad data with a bad checksum, which would be caught by ZFS later on.

On (most) other filesystems you'd be writing bad data and no checksum, and you'd be none the wiser until garbage comes back.

It's a myth that ZFS requires ECC memory; ZFS is safer when running with ECC, but without ECC it will still save your data in a lot of places where most other filesystems won't.

See https://www.reddit.com/r/zfs/comments/7ng231/does_a_zfs_mirr... for a bunch of links on this.

Re:Raspberry Pi 4 by mclehman on Monday June 24, 2019 @06:42AM (#20262088)
In the case of a traditional filesystem, similarly unfortunate memory corruption would just affect the actual data directly. Forgoing ZFS throws out the happy path where the checksum does catch a data error and repairs it transparently.

Edit: To add on to this, ZFS doesn't do parity-based repair at the checksum level. In the mentioned case (good data, bad checksum) no copy of the block will match the checksum and there will be no supposedly-good block to copy over.

Re:Raspberry Pi 4 by nabla9 on Monday June 24, 2019 @06:39AM (#20262071)
Most other filesystems don't do checksum at all, so you can't even discover that you have a data loss/or corruption.

Only difference is that other filesystems may have better tools to rescue damaged filesystem after metadata is corrupted.

Re:Raspberry Pi 4 by ubercow13 on Monday June 24, 2019 @10:09AM (#20263645)
On the other hand, it carries the advantage of being able to correct bad data (or at least detect it) if it writes bad data and a good checksum, which other filesystems won't do. Seeing as the data for a check-summed block is much larger than the checksum itself, this seems like a net win as assuming a uniform probability of memory errors for each byte of memory, an error is more likely to occur in the data (though I guess it depends on the specifics of the implementation).
Re:Raspberry Pi 4 by hyperdunc on Monday June 24, 2019 @03:44AM (#20261331)
I'm using an old SATA SSD with a USB3 adapter I got off ebay. Performance is significantly better than an SD card.
Re:Raspberry Pi 4 by pmontra on Monday June 24, 2019 @06:05AM (#20261911)
And much more reliable, I guess.
Re:Raspberry Pi 4 by wrong_variable on Monday June 24, 2019 @06:01AM (#20261891)
Do you boot Raspbian from a SATA SSD ?
Re:Raspberry Pi 4 by dwater on Monday June 24, 2019 @09:03AM (#20263122)
I have the same setup on 2 pis, and even on a 3b+ I've found it's easier to just put a cheap little microSD card in to hold the bootloader than to try to get USB boot working.
Re:Raspberry Pi 4 by Zenst on Monday June 24, 2019 @09:36AM (#20263393)
The Pi3b+ can boot of USB without any SD card. Can also do this on previous model https://www.raspberrypi.org/documentation/hardware/raspberry... but as you can read, that would make a permanent change to enable via a one time programmable bit and remove the ability to boot from SD card.

Though as you have the 3b+, then you have none of that dilemma and it will just boot, done it myself.

Re:Raspberry Pi 4 by morphle on Monday June 24, 2019 @03:50AM (#20261360)
Only maximum 4 Gbps shared by 1G ethernet, PCIe 2 and 2x USB 3.0? Thats even less speed than 2 harddisks.
Re:Raspberry Pi 4 by fanf2 on Monday June 24, 2019 @06:09AM (#20261928)
The Raspberry Pi 4 has the Ethernet controller on the SoC unlike previous versions, so it does not share the 4Gbit PCIe bus with the USB ports.