Urgent help, NFS mapall changes made all files on NFS 0KB

Drocona

Cadet
Joined
Apr 17, 2020
Messages
4
Hello fellow FreeNAS users,

This is my first post here, I've been lurking for a while building my own FreeNAS.
Today I was working with NFS sharing to put some files on from Linux and use it for persistent storage for containers.

So I had files in there (next to it a back-up because the management tends to remove the persistent storage with a wrong button press) and put everything in place where I wanted them.
Next thing I tried to start up some containers and they got an error not being able to write/mount the NFS path, so a permission error.
This has been very finicky so I figured I had a bad permission setting on the NFS share.
I read the documentation and apparently I should've set the nobody user in the mapall group and user setting, so I changed this (instead off root user as mapall user).

Next thing I know, all my container files in there are 0KB!! Obviously it's some permission thing but I can't for the life get the files back to showing what they actually are. They all show up as empty now and I really really need them back. Unfortunately the back-up files were also in the NFS path so they are 0KB too, basically everything on the NFS is 0KB now.

Anyone got any suggestions how to turn them back to usable files?
I tried putting permissions back on mapall user root but no cigar.
 
Joined
Dec 29, 2014
Messages
1,135
You may need to recreate the files and directories (or change file owner/group) on them after changing the mapall user and group. All I can tell you for certain is that NFS from ESXi doesn't work right unless the mapall user/group are set to root/wheel.
 

Drocona

Cadet
Joined
Apr 17, 2020
Messages
4
Hi, thanks for the reply.

Actually in the end what I actually had to do was select the "All dirs" option and it worked permission wise.
All my files are still 0KB however :(
 
Joined
Dec 29, 2014
Messages
1,135
Actually in the end what I actually had to do was select the "All dirs" option and it worked permission wise.
All my files are still 0KB however :(
All dirs allows mounting at any of the sub-directories instead of just the top level share. I can't see where that would have any impact. Changing the maproot user/group on the share only changes what it will do for any subsequent file creations. It wouldn't change the actual user/group on files already existing in a pool.
 

Drocona

Cadet
Joined
Apr 17, 2020
Messages
4
I know the All dirs option allows to mount sub-directories, it was the fix for my containers not being able to mount their volume within the NFS share. Problem was, before I found the all dirs option I changed the permissions mapall user and group.

I wasn't expecting anything to change user either and the weird thing is when I use the FreeNAS shell, all permissions of files are still root.
What I don't understand is how all files became 0KB after this change, I had my windows view open to check the share permissions and it worked (all files were their correct sizes), when I refreshed this after changing the mapall everything turned 0KB. So something definitely happened there!
 
Top