New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: NFS support #38
Comments
NFS support would be absolutely terrific. Please let’s make this happen. Maybe this forum thread should be linked here: https://misterfpga.org/viewtopic.php?t=2821 I wonder why none of the other commenters — besides @basvandewiel — enganged here before. And by the way: Thank you for your amazing work, @sorgelig. |
No problem @basvandewiel, addon scripts are fine. Support can be compiled in. Booting with NFSd service for everyone isn't a good idea as it will additionally slow down the start. So starting by request is way to go. |
Hello @sorgelig I spent some time over the past few days to hammer out some scripts. I'm reluctant to drop a custom-built kernel on my own MiSTer but things should work (functions just fine on my laptop and RPi). No running processes are required on the MiSTer side of things, so no daemons whatsoever. Only kernel support is needed. The script currently does the following:
If you could be so kind to update the main kernel image to enable the NFS bits on that side, I can start testing in earnest and hope to eventually upstream my script into the main project. The repo is here: https://github.com/basvandewiel/misternfs |
You can test on this: |
May I throw my hat into the ring? NFSv3 is rather old but usually needed for commercially NAS systems, however NFSv4 is way more modern and I'm sure that everyone is using it when one is running a modern distribution for NFS shares / a NAS. Kernel options I'm additionally using:
If discussed and/or accepted, I'd create a PR for this. |
NFSv4 is ~20 years old by now. Any NAS worth its salt supports it. The mount scripts as they stand now also assume it. The main point of contingency here would be the cache flag. If it does RW-caching (not sure if it does) I'd be against enabling it because MiSTer probably never gets a truly clean shutdown from many of its users and corruption will ensue. With speed of IO hardly being a problem for the retro computers we simulate (contemporary IDE drives effectively clocking in at little more than a 10Mbps LAN link), I lean towards disabling the cache flag. It should also be clear that these changes do not require MiSTer to run any daemons. The nfsd is only needed to run a server, which the MiSTer shouldn't try to do out of the box IMHO. |
I'm also unsure if nfs_cache supports RW, but I think it does ... otherwise it would make little sense. |
The docs are quite iffy on the actual functioning of CONFIG_NFS_FSCACHE but it seems to require an additional daemon on the MiSTer to do anything. I say skip it. Same for the pNFS support. The use of NFS SSC is also not something MiSTer will use, but is required for the ability to use NFSv4.2 as a protocol. There probably won't be a NFSv4.2-only server in the wild anytime soon. With the network security posture of MiSTer as a whole in mind (full root access, default passwd etc), I'd say skip it as well for at least the next decade. My guiding principle when building anything is to reducing moving parts, so skip as much as possible. @ojaksch I don't have the scaffolding in place to cross-build a MiSTer kernel. Could you figure out the minimal set of changes required for the MiSTer to connect to an NFSv4 server and submit a PR for just that and leave the NFSv3 bits in place? I'll look into integrating a toggle for that into the scripts for those working off ancient NAS boxes. |
config_patch.zip |
@ojaksch could you maybe "teach me to fish" and get me going with a local build environment for MiSTer kernels? I have an x86_64 laptop with Arch Linux that I'm working from that'd be the best candidate. Haven't built a Linux kernel in over a decade, let a lone cross-compiled one, so I'm a bit rusty there. |
Yep, will do this tomorrow. I'm somewhat drunk now ;) But as you also are using ArchLinux like me, this will be an easy task. |
There are two entries in the Wiki: But in short:
Voila, you'll find your own baked Kernel as |
The MiSTer having Linux under the hood, I was surprised to find out that kernel support for NFS isn't compiled in. While CIFS works, it's a very round about way to work for a Linux system. I'd rather not deal with Samba on my server system if it can be avoided. Compiling in support is no more than a single line in the kernel config.
If this gets an OK, I can start working on scripts that make it work in similar ways to the current CIFS implementation.
The text was updated successfully, but these errors were encountered: