SOLVED Mount request denied after every reboot

NobleKangaroo

Dabbler
Joined
Apr 18, 2017
Messages
18
Hello,

I've been a user of TrueNAS since 2014 or so. I used iSCSI for a long time but have recently (the last year or so) swapped to NFS. One thing that I've been unable to fix for a long time is an issue where after rebooting TrueNAS, I always get "mount request denied" errors in the logs when hosts try to access NFS mounts. Simply saving the NFS settings for any of my NFS shares (not necessarily the one that access is being denied to) seems to resolve this. I'm completely puzzled here as outside of reboots, NFS is rock solid. I've toughed this out about as long as I can take it, and would really like to sort this out for good.

Some background of how I have the shares setup right now:
- All of the shares are "All dirs", even though I do map to the specific paths configured on the NFS mounts
- They're all temporarily configured with mapall user root and mapall group wheel, to eliminate file permissions as the culprit
- I have specified the FQDN that I want to be able to access the NFS mount, and DNS is working properly

What I've tried:
- Recreating all of my NFS shares from the ground up, to eliminate faulty configs as the issue
- Going back and forth between NFSv3 vs NFSv4, to eliminate v3 vs v4 being the issue
- Removing the hostname in the NFS share config, to eliminate host-based access issues
- Checking /etc/exports after a reboot - everything is listed there as it should be

Really scratching my head here, any suggestions are more than welcome. The only thing I've been able to figure out is that replacing the FQDN with IP address in the NFS shares results in things working, despite the FQDNs working after saving any NFS share config. DNS is definitely not an issue as it's working everywhere else in the network, so I'm wondering if perhaps there's some oddity occurring at reboot wherein the hostname resolution isn't working before the NFS exports are configured? Still tinkering to try and come up with an answer.


Thanks!

NobleKangaroo


Edit: Checking my logs, I found a lot of entries about "can't get address info for host [my Docker host's FQDN]".
Code:
Jan 28 15:02:52 nas01 kernel: em0: link state changed to UP
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493365-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493477-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493498-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/media/torrents -alldirs -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493611-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493616-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493624-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/media/movies -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493729-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493746-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493754-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/media/anime -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493854-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493860-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493867-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/media/tv_shows -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493962-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493967-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.493974-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/media/preroll -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494071-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494076-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494083-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/media/.incoming -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494182-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494188-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494195-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/media/.scripts -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494494-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494500-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494508-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/media/music -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494604-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494610-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494617-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/media/roms -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494708-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494713-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494720-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/private -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494841-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494848-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494855-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/docker/valheim_backups -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494951-05:00 nas01.den.foxroot.io mountd 2712 - - can't get address info for host dock01.den.foxroot.io
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494956-05:00 nas01.den.foxroot.io mountd 2712 - - bad host dock01.den.foxroot.io, skipping
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494964-05:00 nas01.den.foxroot.io mountd 2712 - - bad exports list line '/mnt/red/docker/nextcloud -alldirs -mapall': no valid entries
Jan 28 15:02:52 nas01 1 2022-01-28T15:02:52.494974-05:00 nas01.den.foxroot.io mountd 2712 - - can't open /etc/zfs/exports
Jan 28 15:02:52 nas01 nfsd: can't register svc name
Jan 28 15:02:52 nas01 kernel: NLM: local NSM state is 0
Jan 28 15:02:52 nas01 Security policy loaded: MAC/ntpd (mac_ntpd)
Jan 28 15:02:52 nas01 kernel: em1: link state changed to UP


Seems as though NFS services aren't waiting for DNS to resolve the host. I found this page, which suggests that timeouts in domain resolution are common with NFS and that manually adding hosts entries can speed up name resolution. IMO it's a bit kludgy as I'll have to go back in here and manually add hosts that need to access the NFS shares. It's better than not working at all though, I suppose.

I also tested netwait, setting the gateway as the netwait host, which also seems to work. In the end, I think I'll go with the netwait option as I won't have any additional configuration if I add more hosts that need to access the NFS shares.
 
Last edited:
Top