LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (http://www.linuxquestions.org/questions/%2Absd-17/)
-   -   connecting openbsd to linux nfs mount - "unsupported protocol" error (http://www.linuxquestions.org/questions/%2Absd-17/connecting-openbsd-to-linux-nfs-mount-unsupported-protocol-error-306289/)

animehair 03-26-2005 10:15 AM

connecting openbsd to linux nfs mount - "unsupported protocol" error
 
hi everyone,

Im trying to connect an openbsd 3.7 machine to a nfs share point that is residing on a Gentoo linux box. I have all the services running (portmap, nfs, mountd). When i issue this command on my open bsd box:
Code:

mount -t nfs 192.168.0.9:/server/sharedir /local/mountpoint
i get this error when i try to enter into the /local/mountpoint directory:
Code:

/local/mountpoint: Protocol not supported
I can successfully connect to this nfs share from other linux boxes, and i can successfully create a share on the bsd box and connect to it from a linux box.

here is my exports entry on the server:
Code:

/server/sharedir 192.168.0.0/255.255.255.0(rw,insecure)
i have "combed" through the man documents AND have put in allot of google time. I will appreciate any help. thanks

nixcraft 03-27-2005 03:13 AM

I hope /local/mountpoint exists.

It put logs in /var/log/message what error you got it...?

Make sure nothing is blocking the nfs request via firewall or access tables

Also try to use mount_nfs...

animehair 03-27-2005 01:14 PM

ok in /var/log/messages it doesnt mention anything about the error message. Maybe i need to fix a client config option to get nfs to output some logs. Ive used mount_nfs and i still get the same problem. The local mount point does exist. I dont have a firewall setup or access lists on the machines.

Im sure its something simple, because NFS isnt really that complicated to setup to begin with. Thanks for you help so far, any other suggestions?

animehair 03-27-2005 04:52 PM

SOLVED THE PROBLEM!!!!!!!
 
ok i figure out the problem...so here it is...

Ok from my scenerio i had a gut feeling that there was some protocol mismatch between the linux box and the openbsd box. So one theory was that the openbsd box may have been using a different version of NFS protocol then what the server was using. So i started digging into the /etc/init.d scripts on the Gentoo server and noticed the NFS script. Upon viewing it I saw that config options were being passed from another text file located in /etc/config.d/nfs

So after viewing /etc/config.d/nfs script i saw a config option for rpc.mountd. This sounded like something that would be used to tweak NFS mounting. So i found the manpage which explains what RPC.MOUNT does and how to configure it.
Here is the description of RC.MOUNT from the manpage:
Code:

The rpc.mountd program implements the NFS mount protocol. When receiving a MOUNT request from an NFS client,
it checks the request against the list of currently exported file systems. If the client is permitted to
mount the file system, rpc.mountd obtains a file handle for requested directory and returns it to the client.

The config option that interested me was the "--no-nfs-version".

So to get OPENBSD to connect to my Gentoo NFS server I set the NFS version to 2 on the server because apparently my Gentoo kernel wasnt compiled with NFSvr3. After doing this everything worked fine. Alternatively i could recompile the Gentoo kernel to accept a client using NFSvr3 however at this present time I dont have the time nor the reason to do that. Maybe in a future system upgrade ill consider that.

here is my final /etc/config.d/nfs configuration:

Code:

# Options to pass to rpc.mountd
# ex. RPCMOUNTDOPTS="-p 32767
RPCMOUNTDOPTS="--no-nfs-version 3"

WOW it feels good to be able to contribute something back to the community. take care everyone.

nixcraft 03-28-2005 02:21 AM

That is just good...
Just one thing when i said /var/log/message it was for NFS server and not the nfs client try to see that may be you had got hint eariler...


All times are GMT -5. The time now is 04:31 AM.