Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
nfs4
nfs4
Hi everyone,
I'm currently setting up the b3 and when trying to use nfs4, I got a 'protocol not supported' at the client. Since I'm pretty sure the client supports nfs4, I'm wondering... has anyone nfs4 running? Was there any need for modofications?
jhr
I'm currently setting up the b3 and when trying to use nfs4, I got a 'protocol not supported' at the client. Since I'm pretty sure the client supports nfs4, I'm wondering... has anyone nfs4 running? Was there any need for modofications?
jhr
Re: nfs4
I'm running nfs on my B3. Can't remember exactly what I did to set it up, but I've got the packages nfs-common and nfs-kernel-server installed. I think I just installed them, set up a share in /etc/exports and started the daemon.jhr wrote:I'm currently setting up the b3 and when trying to use nfs4, I got a 'protocol not supported' at the client. Since I'm pretty sure the client supports nfs4, I'm wondering... has anyone nfs4 running? Was there any need for modofications?
/Daniel
Re: nfs4
But that doesn't necessarily make it nfs4. Have you tried mount it as such, i.e.
or similar?
Code: Select all
mount -t nfs4 b3:/data /data
Re: nfs4
Darn. You're very right. I'm apparently using nfs3, when saying explicitly I want nfs4 I also get "Protocol not supported". Guess I need to read up on differences between nfs versions...jhr wrote:But that doesn't necessarily make it nfs4. Have you tried mount it as such, i.e.or similar?Code: Select all
mount -t nfs4 b3:/data /data
/Daniel
Re: nfs4
Well, what I'd like to have is the uid and gid mapping tha's possible with nfs4. If someone knows anything, tell me...DanielM wrote:Darn. You're very right. I'm apparently using nfs3, when saying explicitly I want nfs4 I also get "Protocol not supported". Guess I need to read up on differences between nfs versions...
Modifying the kernel might be more problematic... :/
Re: nfs4
I'm most likely talking out of my arse here, but I thought version 4 was now the default. It caused my problems when upgrading from Bubba2 to B3.
From b3 /etc/exports:
Trying to mount a NFS share from a much older server on the B3 (that used to work fine on Bubba2), it would always fail until I added the vers=3 option to fstab on the B3:
Cheers,
Cheeseboy
From b3 /etc/exports:
Code: Select all
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
Code: Select all
popcorn:/opt/sybhttpd/localhost.drives/HARD_DISK/Video /home/storage/mounts/popcorn nfs vers=3,user,rw,async 0 1
Cheeseboy
Re: nfs4
And as it turns out, b3 doesn't seem to know about version 4:
Code: Select all
root@b3 [~] # rpcinfo -u localhost nfs 3
program 100003 version 3 ready and waiting
root@b3 [~] # rpcinfo -u localhost nfs 4
rpcinfo: RPC: Program/version mismatch; low version = 2, high version = 3program 100003 version 4 is not available
Re: nfs4
Hi again,
I think it is a configuration issue:
Perhaps this:
https://help.ubuntu.com/community/NFSv4Howto
Again, I haven't tried this, I'm just a google-monkey at this time...
I think it is a configuration issue:
Code: Select all
aptitude show nfs-kernel-server
Package: nfs-kernel-server
State: installed
Automatically installed: no
Version: 1:1.2.2-4
......
The NFS kernel server is currently the recommended NFS server for use with Linux, featuring features such as NFSv3 and NFSv4
https://help.ubuntu.com/community/NFSv4Howto
Again, I haven't tried this, I'm just a google-monkey at this time...
Re: nfs4
Hope this will help:
There's some completely new things to consider with nfs v4.
First, you'll mount it using mount.nfs4, so the type should be "nfs4" rather than "nfs".
Secondly, the exports need to be reworked on the server side. nfs4 first need to export a "root" directory that you have to set up. You then export sub-directories to this root, which you can bind-mount to different locations in the server file system. Yes, a bit more complicated, I'd say.
So you start with a "dummy" directory holding links to the shared directories. For example
mkdir /nfs4root
That directory should be exported with the option "fsid=0" marking it as a nfs-root
exports:
/nfs4root 10.0.0.0/16(rw,async,no_wdelay,no_root_squash,insecure_locks,fsid=0)
Under the root, you create directories for each of the other paths you'd like to export
mkdir /nfs4root/pr0n
mkdir /nfs4root/moarpr0n
Then you bind-mount the proper directories to these:
mount --bind /data/pr0n /nfs4root/pr0n
mount --bind /data2/moarpr0n /nfs4root/moarpr0n
(The mount should ofc go in the fstab on the server so they're persistent)
These directories also need to go in the exports-file, and exported with the "nohide" option.
exports:
/nfs4root/pr0n 10.0.0.0/16(rw,nohide,async,no_wdelay,no_root_squash,insecure_locks) 0 0
/nfs4root/moarpr0n 10.0.0.0/16(rw,nohide,async,no_wdelay,no_root_squash,insecure_locks) 0 0
To mount them, you omit the root-part of the path. The corresponding entries in fstab would be:
/10.0.0.42:/pr0n /storage/pr0n nfs4 user,rw,async 0 0
/10.0.0.42:/moarpr0n /storage/moarpr0n nfs4 user,rw,async 0 0
Restart the nfsd, and if you're lucky they'll be mountable on the client.
There's some completely new things to consider with nfs v4.
First, you'll mount it using mount.nfs4, so the type should be "nfs4" rather than "nfs".
Secondly, the exports need to be reworked on the server side. nfs4 first need to export a "root" directory that you have to set up. You then export sub-directories to this root, which you can bind-mount to different locations in the server file system. Yes, a bit more complicated, I'd say.
So you start with a "dummy" directory holding links to the shared directories. For example
mkdir /nfs4root
That directory should be exported with the option "fsid=0" marking it as a nfs-root
exports:
/nfs4root 10.0.0.0/16(rw,async,no_wdelay,no_root_squash,insecure_locks,fsid=0)
Under the root, you create directories for each of the other paths you'd like to export
mkdir /nfs4root/pr0n
mkdir /nfs4root/moarpr0n
Then you bind-mount the proper directories to these:
mount --bind /data/pr0n /nfs4root/pr0n
mount --bind /data2/moarpr0n /nfs4root/moarpr0n
(The mount should ofc go in the fstab on the server so they're persistent)
These directories also need to go in the exports-file, and exported with the "nohide" option.
exports:
/nfs4root/pr0n 10.0.0.0/16(rw,nohide,async,no_wdelay,no_root_squash,insecure_locks) 0 0
/nfs4root/moarpr0n 10.0.0.0/16(rw,nohide,async,no_wdelay,no_root_squash,insecure_locks) 0 0
To mount them, you omit the root-part of the path. The corresponding entries in fstab would be:
/10.0.0.42:/pr0n /storage/pr0n nfs4 user,rw,async 0 0
/10.0.0.42:/moarpr0n /storage/moarpr0n nfs4 user,rw,async 0 0
Restart the nfsd, and if you're lucky they'll be mountable on the client.
Re: nfs4
DO NOT try to remove the directory you idiotically --bind mounted to your home directory just because it doesn't show up under mounts...
That's what I did when I couldn't get it to work the way described above
EDIT:
Sorry, that was unfair, I tried a similar recipe I found on the web yesterday, not exactly Ancan's above.
That's what I did when I couldn't get it to work the way described above

EDIT:
Sorry, that was unfair, I tried a similar recipe I found on the web yesterday, not exactly Ancan's above.