LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   nfs4 support (https://www.linuxquestions.org/questions/slackware-14/nfs4-support-728364/)

[GOD]Anck 05-25-2009 09:22 AM

nfs4 support
 
Does Slackware 12.2 have any nfs4 support at all? /sbin/mount.nfs4 seems to be missing, and mount -t nfs4 gives an "unknown filesystem type" error..?

onebuck 05-25-2009 11:03 AM

Hi,

From 'man nfs';

Quote:

NAME
nfs - fstab format and options for the nfs and nfs4 file systems

SYNOPSIS
/etc/fstab

DESCRIPTION
NFS is an Internet Standard protocol created by Sun Microsystems in
1984. NFS was developed to allow file sharing between systems residing
on a local area network. The Linux NFS client supports three versions
of the NFS protocol: NFS version 2 [RFC1094], NFS version 3 [RFC1813],
and NFS version 4 [RFC3530].
I believe that the support is contained/supported by '/sbin/mount.nfs'. You could try the 'auto' to see if it works. You are certain that it is a nfs4 filesystem?

[GOD]Anck 05-25-2009 12:52 PM

Yes, I'm sure.. I mounted the same filesystem on a Debian box using mount -t nfs4 and /bin/mount showed me:

Code:

10.0.0.17:/data on /mnt/data type nfs4 (rw,addr=10.0.0.17)
When I try from my Slackware box with mount -t auto, it tells me:

Code:

mount: special device 10.0.0.17:/data does not exist
When I try with mount -t nfs I get access denied and the server log complains:

Code:

May 25 19:31:05 s17 mountd[3869]: refused mount request from 10.0.0.26 for /data (/): not exported
mountd shouldn't even be involved in an nfs4 mount, right? So mount -t nfs probably tried to use v3 instead, and failed.

EDIT:

Looked at my kernel config, it seems the default is:

Code:

# CONFIG_NFS_V4 is not set
CONFIG_NFSD_V4=y

Kind of strange that the default has v4 server enabled, but not client, but okay.. on the off chance, I recompiled my kernel with CONFIG_NFS_V4=y, and also reinstalled the nfs-utils package, but neither made any difference.

[GOD]Anck 05-25-2009 03:26 PM

Found my answer in the nfs-utils.SlackBuild, nfs4 support is in fact disabled:

Quote:

# No NFSv4 yet -- it requires additional libraries.
I'll have to build my own then.

[GOD]Anck 05-25-2009 05:33 PM

For reference, and in case nfs4 support doesn't make it into the next Slackware, here's how to add your own, quick and dirty:
  • Download, configure && make && make install libevent and libnfsidmap, find them at citi
  • Grab the nfs-utils slackbuild and sources from your favorite mirror. Edit the slackbuild, s/--enable-nfsv4=no/--enable-nfsv4/g, comment out line 103 (rm -rf $PKG/sbin/*nfs4), build and install the nfs-utils package
  • Recompile your kernel with CONFIG_NFS_V4=y
  • modprobe nfs, this doesn't get autoloaded for some reason
  • mount -t nfs4 your.nfs4.server:/path /mnt/point (if you don't specify -t, mount will try nfsv3 instead)

onebuck 05-25-2009 07:54 PM

Hi,

I don't use nfs4 at this time but it's good that you found the solution.

Thanks for posting back.

camerabambai 11-04-2011 05:59 PM

Nfs4 works fine on Slackware 13.37
someone know how to set autofs?

hpfeil 11-28-2011 02:54 PM

Tried to mount an NFSv4 export from a HPC server so I could ramp up openmpi on multiple boxen.
mount.nfs: an incorrect mount option was specified
Checking the SlackBuild configure, "--enable-nfsv4=no" is still in Slackware Current (nfs-utils-1.2.3-x86_64-3). This after spending some time trying to figure out why the directory /var/lib/nfs/v4recovery was missing. If I ssh to the cluster, I can mount /home/hpc1, mpirun appears to work, but I'm rewriting the cpu/core inventory to include the cpuid info (the processes could all be running on the 4 cores on that box). Farther down in nfs-utils.SlackBuild:

# No NFSv4 yet, so remove these:
rm -f $PKG/sbin/*nfs4

provides another clue. Which libraries are missing? I'll try to configure and make the source with nfs4 enabled, maybe ldd will say what's missing?
I know the Slackware Team has their plate full, so we need to pitch in and help in such matters. Current file list has 3148 packages to manage.
`bzcat MANIFEST.bz2 | wc -l` is up to 376,576 files, not that anyone installs everything.

camerabambai 11-29-2011 07:59 AM

libnfsidmap is the first needed

camerabambai 11-29-2011 08:08 AM

libgssglue is another one
librpcsecgss another one

camerabambai 11-29-2011 08:24 AM

Try to recompile but

checking for krb5_get_error_message in -lgssapi_krb5... yes
checking for krb5_get_init_creds_opt_set_addressless in -lgssapi_krb5... no
checking for authgss_create_default in -lrpcsecgss... no
configure: error: librpcsecgss not found.
make: *** Nessun obiettivo specificato e nessun makefile trovato. Stop.
make: *** Nessun obiettivo specificato e nessun makefile trovato. Stop.

Of course i had installed librpcsecgss

camerabambai 11-29-2011 12:10 PM

http://canich.net/slackware/krb5.html

Probably found solution

camerabambai 11-29-2011 12:34 PM

checking for unistd.h... yes
checking for clnt_tli_create in -ltirpc... no
configure: error: libtirpc not found.

:(

camerabambai 12-03-2011 06:20 PM

With tirpc package from ponce.cc and other packages listed
in canick.net works fine.

camerabambai 12-03-2011 07:39 PM

Nfs4 works fine :)

camerabambai 10-04-2012 07:27 PM

https://reteprivata.dyndns-ip.com/pacchetti/nfs4-krb5/ (sometimes site don't work)

If interested,some slackbuilds working for nfs4
on slackware64 14
Don't forget to remove portmap and do
Code:

ln -s /usr/lib64/libnfsidmap*  /usr/lib/
Then will work all,nfs and if you want kerberos encryption(krb5i,p)

wildwizard 10-05-2012 04:38 AM

Quote:

Originally Posted by camerabambai (Post 4797621)
Code:

ln -s /usr/lib64/libnfsidmap*  /usr/lib/

That looks like a hack to fix a bug in a broken SlackBuild, it would be better to fix the SlackBuild so that it installs things properly.

The site you linked is currently down so I can't see what it has on there but getting nfs4 working on Slackware requires a bit less then what has been previously stated in this thread.

First the dependencies that are required libevent, libnfsidmap and libtirpc. (Kerberos is not required unless you need it for authentication.)
Portmap is dead and gone replaced by rpcbind, this also gives us ipv6 support for RPC services.
Then nfs-utils is rebuilt enabling nfs4 (I also suggest upgrading it as well)

camerabambai 10-05-2012 05:08 PM

Yes is a dirty solution to do ln -sf,but work :)
"(I also suggest upgrading it as well"
I have tried to upgrade to 1.2.6 but give me some
auth problems,i will retry now..

camerabambai 10-05-2012 05:14 PM

Confirm 1.2.6 give problems if use auth krb5

camerabambai 05-31-2013 11:11 PM

Tryng to upgrade to latest packages but..

Code:

make[2]: Entering directory `/tmp/nfs-utils-1.2.8/utils/gssd'
/bin/sh ../../libtool --tag=CC  --mode=link gcc -Wall -Wextra -Wstrict-prototypes  -pipe -O2 -fPIC  -I/usr/kerberos/include -I/usr/kerberos/include -O2 -fPIC  -ltirpc  -o gssd gssd-context.o gssd-context_mit.o gssd-context_heimdal.o gssd-context_lucid.o gssd-gss_util.o gssd-gss_oids.o gssd-err_util.o gssd-gssd.o gssd-gssd_main_loop.o gssd-gssd_proc.o gssd-krb5_util.o ../../support/nfs/libnfs.a  -L/usr/kerberos/lib -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/kerberos/lib -lkrb5 -lk5crypto -lcom_err -L/usr/kerberos/lib -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/kerberos/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
libtool: link: gcc -Wall -Wextra -Wstrict-prototypes -pipe -O2 -fPIC -I/usr/kerberos/include -I/usr/kerberos/include -O2 -fPIC -o gssd gssd-context.o gssd-context_mit.o gssd-context_heimdal.o gssd-context_lucid.o gssd-gss_util.o gssd-gss_oids.o gssd-err_util.o gssd-gssd.o gssd-gssd_main_loop.o gssd-gssd_proc.o gssd-krb5_util.o -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/kerberos/lib -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/kerberos/lib  /usr/lib64/libtirpc.so /usr/lib64/libgssglue.so -lnsl -lpthread /usr/lib64/libgssapi.so /usr/lib64/libheimntlm.so ../../support/nfs/libnfs.a -L/usr/kerberos/lib -lgssapi_krb5 /usr/lib64/libkrb5.so /usr/lib64/libheimbase.so /usr/lib64/libhx509.so /usr/lib64/libwind.so /usr/lib64/libheimsqlite.so /usr/lib64/libhcrypto.so /usr/lib64/libasn1.so /usr/lib64/libroken.so -lcrypt -ldl -lresolv -lk5crypto -lcom_err -pthread
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: warning: libcom_err.so.2, needed by /usr/lib64/libtirpc.so, may conflict with libcom_err.so.3
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: warning: libkrb5.so.3, needed by /usr/kerberos/lib/libgssapi_krb5.so, may conflict with libkrb5.so.26
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: gssd-krb5_util.o: undefined reference to symbol 'krb5_free_keytab_entry_contents@@krb5_3_MIT'
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: note: 'krb5_free_keytab_entry_contents@@krb5_3_MIT' is defined in DSO /usr/kerberos/lib/libkrb5.so.3 so try adding it to the linker command line

How to add to command line?
I have tried LDFLAGS="-libkrb5" but doesn't work

camerabambai 11-06-2013 10:11 AM

https://reteprivata.dyndns-ip.com/pacchetti/nfs4-krb5/

14.1 packages

works fine on 14.1
only do after install

ln -s /usr/lib64/libnfsidmap/ /usr/lib/libnfsidmap/


All times are GMT -5. The time now is 05:51 PM.