News for hackers. Stuff that matters.
Re:Raspberry Pi 4 can finally boot directly from USB by chaz6 on Saturday September 19, 2020 @08:22AM (#24526948)
How do you handle persistent storage? I find it is often non-trivial to adapt an appliation-specific operating system to run via pxe boot.
Re:Raspberry Pi 4 can finally boot directly from USB by rwmj on Saturday September 19, 2020 @10:12AM (#24527547)
No one in the thread has mentioned it yet, but NBD is also an option, either NBD root or NBD for particular filesystems. I've used it for managing Pis and a couple of SiFive boards. It has different trade-offs from NFS (not necessarily faster/slower/better/worse, depends on what you're doing).

For what I'm doing which is software builds I was able to write a specific NBD driver[1] for this task which has quite large performance gains, although there are trade-offs that only make sense for temporary build directories. I don't believe this is possible with NFS at all, or at least not without far more effort.

[1] https://rwmj.wordpress.com/2020/03/21/new-nbdkit-remote-tmpf...

Re:Raspberry Pi 4 can finally boot directly from USB by sippingjippers on Saturday September 19, 2020 @10:42AM (#24527733)
Probably the most important tradeoff between nbd/nfs is that NFS by virtue of supporting shared mutation, means client-side caching is either non-existent or barely useful

With NBD you're giving a filesystem driver exclusive access to a block device, the kernel knows the underlying isn't expected to change, so for example no round-trips are required to read or revalidate some cached data, and something like "find /" while slow to run the first time around, will likely be served from cache on a subsequent pass, and thus lightning fast

Re:Raspberry Pi 4 can finally boot directly from USB by rwmj on Saturday September 19, 2020 @10:56AM (#24527827)
This is very true, but I think NFSv4 makes things a little better?