TrueNAS - Files not visible across SMB, NFS and TrueNAS shell

lell186

Dabbler
Joined
Nov 11, 2021
Messages
12
Hi All

I have spent a bit of time trying to figure this out myself but haven't really been able to get anywhere and am hoping that someone here can help out! I have a mirrored vdev setup for a single pool with three datasets. I am using NFS for my unix servers and SMB on windows and am running into an issue where the data written over NFS is undetected within SMB and within the TrueNAS datasets. The screenshow below shows that 6.74 TiB has been used but nothing is showing under the datasets:

pools.PNG


Perplexingly, empty directories are being shown under the TrueNAS web shell as follows:

web_shell.PNG


But under NFS mounted to a different system I see:

nfs.PNG


This is one of many folders / files within this directory. I have seen quite a few threads about the incompatibility / potential issues between NFS and SMB which I did not know about before setting it up this way (I've setup both SMB / NFS manually on linux servers previously and not encountered this issue). I have since found and enabled the 'Multi-protocol (NFSv3/SMB) shares' option for my SMB share inside of the TrueNAS options but it seems that it has not changed anything that was previously created under NFS. Though I have been able to create files on nfs / smb and confirm that it appears to work as it should for anything new (that is NOT in the folders as shown in NFS - i.e in the root of /mnt/tank).

That being the case, how do I get my files created previously under NFS to show in TrueNAS / SMB? Is there anything else that I should be aware of? I don't really use the datasets to be honest and I'm not sure they are needed for my use case but I'm worried that if I delete them I will delete my underlying dataset.

Thanks in advance for any help you are able to provide :smile:
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
What about file rights?

In general I would recommend to "restart" with a fresh dataset and experiment. That kind of approach usually helps to isolate the critical aspects and gives you results faster than working on the "real" data.
 

lell186

Dabbler
Joined
Nov 11, 2021
Messages
12
Hi Chris

Thanks for responding. I ended up resolving this before you commented and I'll detail how just in case someone else winds up with the same issues. I don't think it was anything to do with permissions unless there was some intricacy between the permissions applied in SMB vs NFS as all the files were owned by the same user and I tried to update the permissions early on as a possible solution.

Once I had enabled the 'Multi-protocol (NFSv3/SMB) shares' option for my SMB share and verified that files created at the root of my pool were visible by both I stopped the services that relied on the files and moved the existing data from dataset to dataset1 via NFS (i.e.
Code:
mv /mnt/tank/dataset /mnt/tank dataset1
) and back (i.e.
Code:
mv /mnt/tank/dataset1 /mnt/tank dataset
). Before I did the move back I deleted the redundant datasets in truenas as they were causing me more trouble than they were worth (they weren't being used for snapshotting or anything like that). Once i'd completed the moves I could see the data on both SMB and NFS and my issues were resolved!
 
Top