NFS Mounts all broken now?

Status
Not open for further replies.

nogi

Explorer
Joined
Jul 5, 2011
Messages
74
I am running 8.0.2-Release and had NFS mounts on Ubuntu 11.10 working fine from the FreeNAS server. I had to change the IP address on the Ubuntu box and on FreeNAS and since I made that change the NFS mounts have all failed. I have updated the IP addresses on the various configs. I'm not sure what to do?? CIFS shares are working fine.

FreeNAS IP: 192.168.1.201
Ubuntu IP: 192.168.1.100

From Ubuntu (manually):
Code:
nogi@UbuntuVM:~$ sudo mount 192.168.1.201:/mnt/DATA/Downloads /mnt/Downloads
mount.nfs: access denied by server while mounting 192.168.1.201:/mnt/DATA/Downloads


From Ubuntu (via fstab):
Code:
192.168.1.201:/mnt/DATA/Downloads /mnt/Downloads nfs rw,nfsvers=3,addr=192.168.1.201 0 0


On FreeNAS (console on error):
Code:
Nov  1 23:15:55 KANDOR mountd[24390]: mount request denied from 192.168.1.100 for /mnt/DATA/Downloads


On FreeNAS (/etc/exports):
Code:
/mnt/DATA/Downloads -maproot=media:wheel 192.168.1.100


media:wheel has full rights to /mnt with recursive enabled.

Oh and these errors have started to appear for all my NFS shares:
Code:
Nov  1 18:43:21 KANDOR mountd[2684]: can't change attributes for /mnt/DATA/Downloads
Nov  1 18:43:21 KANDOR mountd[2684]: bad exports list line /mnt/DATA/Downloads -alldirs -maproot


I have also tried to delete all the NFS shares and recreated them with no luck :confused:
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Make sure you're leaving /etc/exports on the FreeNAS box alone and manage it from the GUI. Looks like your /etc/exports is hosed. Try turning NFS off and then back on, see if the messages go away, and if not, see if you can figure out what setting you've used is causing the trouble.
 

nogi

Explorer
Joined
Jul 5, 2011
Messages
74
Yeah, I'm not touching the /etc/exports file at all. I just grabbed it to see if the corruption was obvious which it wasn't. I've also tried to stop/start the NFS service with no luck. Not sure what else I can do? Is there a way to clean it of all NFS configs and start again?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Try deleting the NFS export via the GUI and see what happens.
 

nogi

Explorer
Joined
Jul 5, 2011
Messages
74
You mean by deleting all the NFS shares? I've done this already with no joy. It's almost like it keeps remembering some old config somehow.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
/etc/exports gets generated at boot from settings in the database/gui.

@dalex posted a link to a nice windows sqlite database browser/tool that could let you dig into the database and see what NFS settings may be lingering. You'd have to copy /data/freenas-v1.db to some drive accessible from windows. If you decided to make any changes using it, you'd have to mount your flash drive read-write (mount -uw /) and then copy it back to /data and reboot. Make a backup of your settings from the GUI before you do that though. Here's the link:

http://sqlitebrowser.sourceforge.net/

It doesn't seem like the database gets updated/reset properly for some stuff. It'll be interesting to hear if you find any old settings that are causing your problem.
 

nogi

Explorer
Joined
Jul 5, 2011
Messages
74
/etc/exports gets generated at boot from settings in the database/gui.

@dalex posted a link to a nice windows sqlite database browser/tool that could let you dig into the database and see what NFS settings may be lingering. You'd have to copy /data/freenas-v1.db to some drive accessible from windows. If you decided to make any changes using it, you'd have to mount your flash drive read-write (mount -uw /) and then copy it back to /data and reboot. Make a backup of your settings from the GUI before you do that though. Here's the link:

http://sqlitebrowser.sourceforge.net/

It doesn't seem like the database gets updated/reset properly for some stuff. It'll be interesting to hear if you find any old settings that are causing your problem.

That's a great little tool. I had a look at the table: sharing_nfs_share and it all looks fine. Can't see any old setting in there.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
If your /data was filling up, that'll be bad, and may explain bad things happening in /etc/exports or elsewhere.
 

nogi

Explorer
Joined
Jul 5, 2011
Messages
74
Ok, I still seem to be having this issue. This is the last thing I tried:
  • Copied db and checked NFS table - confirmed entries
  • Removed all shares from GUI
  • Disabled NFS via GUI
  • Copied db and checked NFS table - traces of previous shares there but desc removed
  • Rebooted FreeNAS
  • Copied db and checked NFS table - empty (as expected)
  • Enabled NFS via GUI
  • Created a single NFS share
  • Checked Console - error same as before
 

nogi

Explorer
Joined
Jul 5, 2011
Messages
74
Sounds like I need to do a fresh install and go from there. Can I save my config, do a clean install, import my config and still have my RAIDZ preserved?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Sounds like I need to do a fresh install and go from there. Can I save my config, do a clean install, import my config and still have my RAIDZ preserved?

Yes, but importing your config could bring back whatever junk is causing your problem. You can save your config, export your pool, do a clean install, and then Auto-Import your pool again and your RAIDZ will be preserved. If you don't have too many settings and don't mind entering them again, that would be the clean way to go. You can use that database tool I posted to view your backed up settings done from the GUI and use that as a reference to get your settings back to the way they were before. It would be nice to have a little tool export those settings in a human readable format to look at if you needed to.
 

nuttervm

Cadet
Joined
Nov 15, 2011
Messages
4
same here

I have also been experiencing similar problems.

I am running a fresh install of v8.0.2-release inside VMWare, and have exported a single NFS share via the WebGUI to VMWare esxi 4.1u1. VMWare sees the volume but any attempt to write to it results in errors.

I am very disappointed that such a simple configuration does not work.
 

david31262

Dabbler
Joined
Jun 1, 2011
Messages
12
I was having a heck of a time mounting an NFS share From one Freenas box to another.
I eventually got it to work by adding both ip address to both boxes /etc/hosts file.

(I somewhat undertand that your supposed to enter the allowed ip address(s) into the gui, but it didn't seem to work for me).

Remember that for this change to survive a reboot you have to remount the os partition rw and make the change...
Code:
mount -o rw /dev/ufs/FreeNASs1a /
cd /conf/base/etc
edit hosts
 

nuttervm

Cadet
Joined
Nov 15, 2011
Messages
4
I was having a heck of a time mounting an NFS share From one Freenas box to another.
I eventually got it to work by adding both ip address to both boxes /etc/hosts file.

(I somewhat undertand that your supposed to enter the allowed ip address(s) into the gui, but it didn't seem to work for me).

Remember that for this change to survive a reboot you have to remount the os partition rw and make the change...
Code:
mount -o rw /dev/ufs/FreeNASs1a /
cd /conf/base/etc
edit hosts


I am sure that manually editing the exports or hosts files would allow this behavior... but as I've said before on the old forums, IMO that somewhat defeats the purpose of FreeNAS: to provide an easy(ier) to use storage appliance... if I wanted to use CLI I wouldn't be using FreeNAS.

arg... very frustrating that a storage appliance product doesn't work 'out of the box' for NFS, which is probably the second or third most popular file sharing protocol that it is supposed to provide. (I assume CIFS and iSCSI might be more popular). Seriously, how could this have been missed?

Developers: please restore my faith and instill some more QA into your product development process!
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I was having a heck of a time mounting an NFS share From one Freenas box to another.
I eventually got it to work by adding both ip address to both boxes /etc/hosts file.

(I somewhat undertand that your supposed to enter the allowed ip address(s) into the gui, but it didn't seem to work for me).

Remember that for this change to survive a reboot you have to remount the os partition rw and make the change...
Code:
mount -o rw /dev/ufs/FreeNASs1a /
cd /conf/base/etc
edit hosts

Pretty sure the problem here is a PEBCAK style one... why are you making FreeNAS an NFS *client* of another?

The idea of FreeNAS is to be an NFS *server*. It has some small failings in this regard but does it generally very well. FreeNAS is not intended to work as a client, be it Samba, NFS, iSCSI, AFP, etc., and problems making it work as such are not shocking, and are not QA failures in the product development process.
 

nuttervm

Cadet
Joined
Nov 15, 2011
Messages
4
Pretty sure the problem here is a PEBCAK style one... why are you making FreeNAS an NFS *client* of another?

The idea of FreeNAS is to be an NFS *server*. It has some small failings in this regard but does it generally very well. FreeNAS is not intended to work as a client, be it Samba, NFS, iSCSI, AFP, etc., and problems making it work as such are not shocking, and are not QA failures in the product development process.

I agree that generally FreeNAS is not intended as a NFS client but I think you're missing the point here... the NFS SERVER is not operating properly.

That being said, the NFS protocol is one of the oldest and most well-established storage protocols on the Unix Os. There is no reason why he couldn't/shouldn't be able to use a FreeNAS box to mount a remote NFS partition.

Also I disagree that "It has some small failings in this regard but does it generally very well" is not true. IF NFS does not work 'out of the box' with a very simple configuration, then i would consider that NOT well.

I am sure the underlying problem is relatively minor, and that ixsystems can fix it quickly, but i do believe it speaks volumes about their coding practices and poor QA process.
 
Status
Not open for further replies.
Top