Mailinglist Archive: opensuse (686 mails)

< Previous Next >
Re: [opensuse] Problem mounting nfs partition on 12.3
  • From: "Carlos E. R." <carlos.e.r@xxxxxxxxxxxx>
  • Date: Thu, 11 Jul 2013 14:54:52 +0200 (CEST)
  • Message-id: <alpine.LNX.2.00.1307111312130.16893@Telcontar.valinor>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On Thursday, 2013-07-11 at 12:46 +0200, I wrote:


several more, one every 4 minutes.
...
<0.5> 2013-07-11 12:31:22 Telcontar kernel - - - [511652.320029] nfs: server localhost not responding, timed out


Being on localhost, there can not be firewal issues. This setup worked fine
on 12.1 (sysstemv), but fails now on 12.3 (systemd), I have not changed the
config.


Mounting manually, I get this output:

Telcontar:~ # mount -v localhost:/data/storage_c/repositorios_zypp/ /mnt/nfs/tmpmount.nfs: timeout set for Thu Jul 11 13:06:06 2013
mount.nfs: trying text-based options 'vers=4,addr=::1,clientaddr=::1'
^C
Telcontar:~ #
Telcontar:~ # mount -v 127.0.0.1:/data/storage_c/repositorios_zypp/ /mnt/nfs/tmp mount.nfs: timeout set for Thu Jul 11 13:06:54 2013
mount.nfs: trying text-based options
'vers=4,addr=127.0.0.1,clientaddr=127.0.0.1'
^C
Telcontar:~ # date
Thu Jul 11 13:11:05 CEST 2013
Telcontar:~ #



it does not timeout, despite the message.

However, specifying nfs instead of defaults (which is nfs4), it succeeds:


Telcontar:~ # date --rfc-3339=seconds ; mount -t nfs -v
127.0.0.1:/data/storage_c/repositorios_zypp/ /mnt/nfs/tmp ; date
--rfc-3339=seconds
2013-07-11 13:15:47+02:00
mount.nfs: timeout set for Thu Jul 11 13:17:47 2013
mount.nfs: trying text-based options
'vers=4,addr=127.0.0.1,clientaddr=127.0.0.1'
2013-07-11 13:15:47+02:00
Telcontar:~ # ls /mnt/nfs/tmp
11_2 Karlos ArguiƱano en tu cocina (20110617) - Q9.480*384.xvid.avi
11_3 NO_BORRAR__son_cruciales
11_4 notas
12_1 notas~
12_2 se_montan_en_var_cache_zypp_packages
12_3
Telcontar:~ #


However, the fstab entry does not list nfs4, but nfs:


Telcontar:~ # grep nfs /etc/fstab
localhost:/data/storage_c/repositorios_zypp/ /mnt/nfs/tmp nfs defaults 0 0 Telcontar:~ #


So obviously, nfs4 fails. Why is the system attempting to use nfs4, then, if the fstab entry does not say "nfs4"? Can I somehow specify nfs3? I tried to write "nfs3" in fstab, got an error that said nfs3 was invalid or something.


Another problem when umounting - huh?:

Telcontar:~ # umount /mnt/nfs/tmp
umount.nfs4: /mnt/nfs/tmp: device is busy
Telcontar:~ # umount /mnt/nfs/tmp
umount.nfs4: /mnt/nfs/tmp: device is busy
Telcontar:~ # lsof /mnt/nfs/tmp
...
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
famd 8764 cer 9r DIR 0,41 4096 30986370 /mnt/nfs/tmp
famd 8764 cer 11r DIR 0,41 21 294273060 /mnt/nfs/tmp/11_2
famd 8764 cer 12r DIR 0,41 128 806202862 /mnt/nfs/tmp/11_3
famd 8764 cer 13r DIR 0,41 4096 542959478 /mnt/nfs/tmp/11_4
famd 8764 cer 14r DIR 0,41 4096 13615562 /mnt/nfs/tmp/12_1
famd 8764 cer 15r DIR 0,41 84 13851750 /mnt/nfs/tmp/12_2
famd 8764 cer 16r DIR 0,41 4096 23853594 /mnt/nfs/tmp/12_3
Telcontar:~ # rcfam restart
redirecting to systemctl restart fam
Telcontar:~ # umount /mnt/nfs/tmp
Telcontar:~ #



If I change fstab:

localhost:/data/storage_c/repositorios_zypp/ /mnt/nfs/tmp nfs
defaults,vers=3 0 0

I get another error:

Telcontar:~ # mount -v /mnt/nfs/tmp
mount.nfs: timeout set for Thu Jul 11 13:26:13 2013
mount.nfs: trying text-based options 'vers=3,addr=::1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying ::1 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying ::1 prog 100005 vers 3 prot UDP port 58991
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting
localhost:/data/storage_c/repositorios_zypp/
Telcontar:~ #


If I change fstab to vers=4, it does not work, timeout:

Telcontar:~ # mount -v /mnt/nfs/tmp
mount.nfs: timeout set for Thu Jul 11 13:27:51 2013
mount.nfs: trying text-based options 'vers=4,addr=::1,clientaddr=::1'
^C
Telcontar:~ #


But if I comment the IPv6 entry for localhost in /etc/hosts it succeeds!

#::1 localhost ipv6-localhost ipv6-loopback


Telcontar:~ # mount -v /mnt/nfs/tmp
mount.nfs: timeout set for Thu Jul 11 13:29:20 2013
mount.nfs: trying text-based options
'vers=4,addr=127.0.0.1,clientaddr=127.0.0.1'
Telcontar:~ #



So, the trick seems to be specifying IPv4 and vers=4 in fstab.

How do I force nfs not to even try IPv6, or how do I get it working with IPv6?

[...]

Found it! I need and specific entry in "exports" with "::1(...)" for IPv6 to
work...

Telcontar:~ # umount -v /mnt/nfs/tmp
umount.nfs4: /mnt/nfs/tmp: device is busy
Telcontar:~ # rcfam restart
redirecting to systemctl restart fam
Telcontar:~ # umount -v /mnt/nfs/tmp
Telcontar:~ # mount -v /mnt/nfs/tmp
mount.nfs: timeout set for Thu Jul 11 13:41:22 2013
mount.nfs: trying text-based options 'vers=4,addr=::1,clientaddr=::1'
Telcontar:~ #


- -- Cheers,
Carlos E. R.
(from 12.3 x86_64 "Dartmouth" at Telcontar)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlHeqyQACgkQtTMYHG2NR9VwkACfYkiyJI+sS1FnVIAImQPKvSoA
3IUAn2cHchxcNO3/NSAP/YVlYJTinjKn
=SWNt
-----END PGP SIGNATURE-----
< Previous Next >
References