Spent the past few days testing and doing generally "stupid" things with my MiSTer and NFS. Nothing out of the ordinary happened and I was unable to cause any real damage to anything. This and the lack of any issues submitted to GitHub led me to submit a PR to the upstream MiSTer Scripts repository. Once that gets merged and the Linux kernel gets a rebuild, the MiSter should have working NFS support built-in. Fingers crossed!
NFS Support
- RealLarry
- Top Contributor
- Posts: 883
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 386 times
Re: NFS Support
I never had any problems with my script either (aside from a few minor problems in the beginning because of upper and lower case).
Great to read that my script was useful at the end.
- RealLarry
- Top Contributor
- Posts: 883
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 386 times
Re: NFS Support
Attached is my newest Kernel, build upon Sorgelig's Kernel and latest updates. While Sorgelig already enabled NFS (v3), I've also enabled NFSv4. The other updates in Kernel's repo are updates to the Realtek WiFi drivers and an addition for the RTL8812AU chipset.
Also included is my .config file for a reproducible build.
Just tested and still working which is not a surprise for me
- Attachments
-
- zImage_dtb.7z
- (5.85 MiB) Downloaded 203 times
- RealLarry
- Top Contributor
- Posts: 883
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 386 times
Re: NFS Support
Have you tested my Kernel and consider it "working"? Then yes, for sure. But I'm unsure about some options I'm also using and whether it's a good idea to enable/use them - but I'm using them since 2021/12 and I'm absolutely happy with them. These options are in detail:
CONFIG_PNFS*
CONFIG_NFS_FSCACHE
CONFIG_NFS_USE_KERNEL_DNS
CONFIG_NFS_V4_2_SSC_HELPER=y
(almost taken from my ArchLinux)
- RealLarry
- Top Contributor
- Posts: 883
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 386 times
- RealLarry
- Top Contributor
- Posts: 883
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 386 times
Re: NFS Support
Sorgelig has released a new MiSTer Linux Kernel which is supporting NFS, but, alas, not NFS4
I'll continue to bake and publish my own NFS4-aware Kernel here until next chance. See attachment for the fresh new Kernel, based upon today's changes.
- Attachments
-
- zImage_dtb.7z
- (5.81 MiB) Downloaded 199 times
- RealLarry
- Top Contributor
- Posts: 883
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 386 times
Re: NFS Support
Merged! Attached is the new Kernel, based upon the official source. Tested and is working.
Thanks to everyone who was helping and drove me to completeness!
-
- Posts: 18
- Joined: Thu Jan 06, 2022 9:38 am
- Location: France
- Has thanked: 1 time
- Been thanked: 11 times
- Contact:
Re: NFS Support
Hello,
I would like to add my little something to this beautiful adventure
I've been using a custom script to mount my NAS with CIFS for a few months and it worked for me, but NFS is too nice an addition to pass up.
So I added NFS to my script and posted the whole thing on github for those of you who might be interested.
https://github.com/willoucom/MisterFPGA_Network_Shares
reviews welcome
-
- Top Contributor
- Posts: 623
- Joined: Fri Jan 22, 2021 4:36 pm
- Has thanked: 80 times
- Been thanked: 324 times
Re: NFS Support
What's the stance on Python for MiSTer scripts? It's a lot neater in many ways than shell scripts so I personally like the idea, but Python also brings with it its own complexities.
- RealLarry
- Top Contributor
- Posts: 883
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 386 times
Re: NFS Support
Attached is a new Kernel, based upon the official source from yesterday. Tested and is working.
Reason is (was) an incompatible driver for some Edimax WiFi dongles, which has been reset to older but working ones.
viewtopic.php?p=72523#p72523
https://github.com/MiSTer-devel/Main_MiSTer/issues/769
EDIT: I'll provide all my upcomin' Kernel here to save space on this forum (I don't want to be responsible if the server is full )
EDIT: Link corrected
- Attachments
-
- zImage_dtb.7z
- (5.81 MiB) Downloaded 176 times
Re: NFS Support
Hello guys, I need your help trying this new feature...
I am mounting my storage nfs share with mount -t nfs nasIP:/sharename/ localfolder but MiSTer give me this error:
Same error mounting with FSTAB
Please help me...
Re: NFS Support
Now i have all the time "permission denied"...
If I try to moun same share on my linux pc with mount it do without problems....
Re: NFS Support
Tried, but same error...
Not any official script, not any official guide... NFS on MiSTer is like not existent.... for me.
-
- Top Contributor
- Posts: 623
- Joined: Fri Jan 22, 2021 4:36 pm
- Has thanked: 80 times
- Been thanked: 324 times
Re: NFS Support
The script has been merged upstream making it as official as it gets in my book. That's not to say NFS isn't a finnicky protocol. You must be sure to export NFSv4 mountpoints on your server end. Older protocol versions don't work yet (are very untested). I'm away from my MiSTer until at least Friday so I can't test anything.
There's a readme for the mount_nfs script in my GitHub and the script itself contains comments to explain it's actions.
Permission denied usually points to something on the server's end, where it should get logged.
Re: NFS Support
I think I understand the problem....
I use OpenMediaVault as Nas and on it's wiki i read:
So my NAS export NFSv4 with
Code: Select all
ro,wdelay,root_squash,no_subtree_check,fsid=0
but MiSTer user is root (0:0) then i need to modify like:
Code: Select all
rw,no_root_squash,
This is the error on my OMV log:
Code: Select all
openmediavault rpc.mountd[159809]: refused mount request from 192.168.1.50 for /mister (/): not exported
Right?
I think it will be a very common problem since openmediavault is a very popular software...
-
- Top Contributor
- Posts: 623
- Joined: Fri Jan 22, 2021 4:36 pm
- Has thanked: 80 times
- Been thanked: 324 times
Re: NFS Support
Root squash changes the uid of root on the server to something else, usually high up in the 65000's to make it less of a security risk. Your server docs should tell you what the uid is that root gets squashed to. Once you know that, you can change the ownership of the files and directories on your server to it and the MiSTer will work with it.
The issue is server-side and a property of NFS being an unforgiving piece of rusty razor wire from the distant past.
-
- Top Contributor
- Posts: 623
- Joined: Fri Jan 22, 2021 4:36 pm
- Has thanked: 80 times
- Been thanked: 324 times
Re: NFS Support
I'll see if I can write some docs for OMV specifically over next weekend. The error you're seeing may also be a mixup in your exports. Currently I'm running around a mouse-flavored theme park with a 5 year-old and only have my phone and crappy wifi in queues.. so bear with me please
Re: NFS Support
Finally soved.... the problem was
Code: Select all
-t nfs4
Mounting manually I omitted this because on all standard distro, with nfs-common package I just call mount and all is done automagically with the newer protocol supported from the server.
With busybox we need to add nfs4 type, there is not a kind of automatic handshake to discover newer nfs version that server support...
Anyway, now my problem is what and where mount...
With CIFS I mounted all the folders, except some like linux, Scripts
How can I do the same with nfs? I don't want to mount every single folder....
Which approach do you think would be better?
- RealLarry
- Top Contributor
- Posts: 883
- Joined: Mon May 25, 2020 4:04 am
- Location: San Junipero/DE/Earth
- Has thanked: 120 times
- Been thanked: 386 times
Re: NFS Support
Oh noooo! I feel very sorry for you! "It's a small, small world, lalala, it's a small, small world!"
Damn'! I can't get that sound of my head! I'll go crazy! I'll have to kill some mice NOW!
Re: NFS Support
With cifs_mount script I mounted all the folders, except some like linux, Scripts
How can I do the same with nfs and your script?
Which approach do you think would be better? to have some folders mounted and others not?
-
- Top Contributor
- Posts: 623
- Joined: Fri Jan 22, 2021 4:36 pm
- Has thanked: 80 times
- Been thanked: 324 times
Re: NFS Support
The mount_nfs works a little differently. It mounts a single mountpoints in /tmp and then checks which of the underlying subdirs you also have in /media/fat. The ones it finds that are empty get an NFS-hosted subdir overlaid on there using a bind mount. The readme with the script explains this and I tried to keep the code as readable as possible to show how it's done.
Re: NFS Support
@Bas I noticed that your script doesn't mount the "saves" and "Filters" folders...
I think it's due to the fact that there are also "savestates" and "Filters_Audio" folders (which are mounted)
In /tmp/nfs_mount I can see all folders, saves, savestates, Filters, Filters_Audio and others.
is this maybe a bug?