Re: NFS mount can't read files.

2011-02-08 Thread David Steiner
On Mon, Feb 7, 2011 at 7:34 PM, Pieter Verberne
pieterverbe...@xs4all.nl wrote:
 On Sun, 06 Feb 2011 16:02:31 +0100, Pieter Verberne wrote:

 Hello,

 See thread at the bottom. I have also problems reading files while
 mounting from Ubuntu. I cannot read files larger than +/- 18KB.

 /etc/exports:
 /home/pieter localhost 10.0.0.1 10.0.0.2 10.0.2.15

 On Ubuntu:
 $ sudo mount.nfs lilium:/home/pieter pieter_mount/ -w
 $ cat pieter_mount/test.txt # 17069 bytes
 [ output ]
 $ cat pieter_mount/test1.txt# 18483 bytes
 [ no output. cat keeps running; `ps aux | grep cat`
 pieter3095  0.0  0.0   3896   244 pts/15   D+   15:35 0:00 cat
 pieter_mount/test1.txt ]

 When I mount the same export on the OpenBSD machine it works fine:
 $ sudo mount -t nfs localhost:/home/pieter/ /mount_test/
 $ cat /mount_test/test1.txt
 [output]

 So could be an Ubuntu (and MacOS?) bug. I don't have another Unix/Linux
 computer to try on right now.

 Also, I'm not able to write on the exports. From both Ubuntu and
 OpenBSD(localhost).

 $ touch test
 touch: cannot touch `test': Read-only file system

 It says Read-only _file system_. Could this have anything to do with
 file permissions or the -maproot -allmap options?

 `portmap -d` and `mountd -d` gives no errors. I tried disabling pf. No
 result. No interesting things in /var/log/messages

 Thanks to Jason for a hint. I explicitly have to say to the nfs client
 to use UDP instead of TCP. It looks like TCP support is broken in some
 way? It doesn't work with Ubuntu, MacOS and I found out that mounting
 from a QNAP doesn't work either.

 And, is there a way to make nfs working with the pf scrub option? I'm
 using pppoe and have a NAT, see

 man 4 pppoe
 Problems can arise on machines with private IPs connecting to the
 Internet via a machine running both Network Address Translation (NAT) and
 pppoe.

 So in my pf.conf is
 match on $ext_if scrub (max-mss 1280)

 Is there any way to make nfs working on $ext_if?



FWIW, i'm having some nfs issues too. i have a openbsd file server and
am mounting on linux. it used to work ok, then in the last couple of
months it stopped working. on the client, if i do ls -R on the mount
point, it prints out a couple thousand files and then stops printing
any more. i found mounting with nfs version 2 to be a workaround:

hostname:/data on /mnt/bunny type nfs (rw,vers=2,tcp,addr=192.168.xyz.abc)



Re: NFS mount can't read files.

2011-02-08 Thread Otto Moerbeek
On Tue, Feb 08, 2011 at 05:05:20PM +0100, David Steiner wrote:

 On Mon, Feb 7, 2011 at 7:34 PM, Pieter Verberne
 pieterverbe...@xs4all.nl wrote:
  On Sun, 06 Feb 2011 16:02:31 +0100, Pieter Verberne wrote:
 
  Hello,
 
  See thread at the bottom. I have also problems reading files while
  mounting from Ubuntu. I cannot read files larger than +/- 18KB.
 
  /etc/exports:
  /home/pieter localhost 10.0.0.1 10.0.0.2 10.0.2.15
 
  On Ubuntu:
  $ sudo mount.nfs lilium:/home/pieter pieter_mount/ -w
  $ cat pieter_mount/test.txt # 17069 bytes
  [ output ]
  $ cat pieter_mount/test1.txt# 18483 bytes
  [ no output. cat keeps running; `ps aux | grep cat`
  pieter3095  0.0  0.0   3896   244 pts/15   D+   15:35 0:00 cat
  pieter_mount/test1.txt ]
 
  When I mount the same export on the OpenBSD machine it works fine:
  $ sudo mount -t nfs localhost:/home/pieter/ /mount_test/
  $ cat /mount_test/test1.txt
  [output]
 
  So could be an Ubuntu (and MacOS?) bug. I don't have another Unix/Linux
  computer to try on right now.
 
  Also, I'm not able to write on the exports. From both Ubuntu and
  OpenBSD(localhost).
 
  $ touch test
  touch: cannot touch `test': Read-only file system
 
  It says Read-only _file system_. Could this have anything to do with
  file permissions or the -maproot -allmap options?
 
  `portmap -d` and `mountd -d` gives no errors. I tried disabling pf. No
  result. No interesting things in /var/log/messages
 
  Thanks to Jason for a hint. I explicitly have to say to the nfs client
  to use UDP instead of TCP. It looks like TCP support is broken in some
  way? It doesn't work with Ubuntu, MacOS and I found out that mounting
  from a QNAP doesn't work either.
 
  And, is there a way to make nfs working with the pf scrub option? I'm
  using pppoe and have a NAT, see
 
  man 4 pppoe
  Problems can arise on machines with private IPs connecting to the
  Internet via a machine running both Network Address Translation (NAT) and
  pppoe.
 
  So in my pf.conf is
  match on $ext_if scrub (max-mss 1280)
 
  Is there any way to make nfs working on $ext_if?
 
 
 
 FWIW, i'm having some nfs issues too. i have a openbsd file server and
 am mounting on linux. it used to work ok, then in the last couple of
 months it stopped working. on the client, if i do ls -R on the mount
 point, it prints out a couple thousand files and then stops printing
 any more. i found mounting with nfs version 2 to be a workaround:
 
 hostname:/data on /mnt/bunny type nfs (rw,vers=2,tcp,addr=192.168.xyz.abc)

Did you try udp v3 mounts? That's the default for a reason.

-Otto



Re: NFS mount can't read files.

2011-02-08 Thread David Steiner
 Did you try udp v3 mounts? That's the default for a reason.

-Otto


that did the trick!
(on linux it defaulted to tcp, and i first thought udp would be
unreliable so never tried that.)

cheers



Re: NFS mount can't read files.

2011-02-08 Thread Otto Moerbeek
On Tue, Feb 08, 2011 at 07:15:26PM +0100, David Steiner wrote:

  Did you try udp v3 mounts? That's the default for a reason.
 
 -Otto
 
 
 that did the trick!
 (on linux it defaulted to tcp, and i first thought udp would be
 unreliable so never tried that.)

Linux uses tcp by default? How un-nfs.

-Otto



Re: NFS mount can't read files.

2011-02-08 Thread Pieter Verberne

On Tue, 8 Feb 2011 19:15:26 +0100, David Steiner wrote:

Did you try udp v3 mounts? That's the default for a reason.

   -Otto



that did the trick!
(on linux it defaulted to tcp, and i first thought udp would be
unreliable so never tried that.)

cheers


Oh, I didn't read your mail well. Yes that's right. NFS3 + TCP is
not working. NFS3 + UDP is working. Probably not by design:o)

NFS over UDP is not unreliable. NFS handles error recovery.



Re: NFS mount can't read files.

2011-02-08 Thread Pieter Verberne

On Tue, 8 Feb 2011 20:20:18 +0100, Otto Moerbeek wrote:

On Tue, Feb 08, 2011 at 07:15:26PM +0100, David Steiner wrote:


 Did you try udp v3 mounts? That's the default for a reason.

-Otto


that did the trick!
(on linux it defaulted to tcp, and i first thought udp would be
unreliable so never tried that.)


Linux uses tcp by default? How un-nfs.

-Otto


un-nfs3 that is. nfs4 uses tcp by default.



Re: NFS mount can't read files.

2011-02-08 Thread Miod Vallat
 Linux uses tcp by default? How un-nfs.

It's linux you are talking about. You shouldn't be surprised.



Re: NFS mount can't read files.

2011-02-08 Thread Ted Unangst
On Tue, Feb 8, 2011 at 2:28 PM, Pieter Verberne
pieterverbe...@xs4all.nl wrote:
 un-nfs3 that is. nfs4 uses tcp by default.

nfs4 itself is rather un-nfs like... :)



Re: NFS mount can't read files.

2011-02-07 Thread Pieter Verberne

On Sun, 06 Feb 2011 16:02:31 +0100, Pieter Verberne wrote:

Hello,

See thread at the bottom. I have also problems reading files while
mounting from Ubuntu. I cannot read files larger than +/- 18KB.

/etc/exports:
/home/pieter localhost 10.0.0.1 10.0.0.2 10.0.2.15

On Ubuntu:
$ sudo mount.nfs lilium:/home/pieter pieter_mount/ -w
$ cat pieter_mount/test.txt # 17069 bytes
[ output ]
$ cat pieter_mount/test1.txt# 18483 bytes
[ no output. cat keeps running; `ps aux | grep cat`
pieter3095  0.0  0.0   3896   244 pts/15   D+   15:35 0:00 cat
pieter_mount/test1.txt ]

When I mount the same export on the OpenBSD machine it works fine:
$ sudo mount -t nfs localhost:/home/pieter/ /mount_test/
$ cat /mount_test/test1.txt
[output]

So could be an Ubuntu (and MacOS?) bug. I don't have another 
Unix/Linux

computer to try on right now.

Also, I'm not able to write on the exports. From both Ubuntu and
OpenBSD(localhost).

$ touch test
touch: cannot touch `test': Read-only file system

It says Read-only _file system_. Could this have anything to do with
file permissions or the -maproot -allmap options?

`portmap -d` and `mountd -d` gives no errors. I tried disabling pf. 
No

result. No interesting things in /var/log/messages


Thanks to Jason for a hint. I explicitly have to say to the nfs client
to use UDP instead of TCP. It looks like TCP support is broken in some
way? It doesn't work with Ubuntu, MacOS and I found out that mounting
from a QNAP doesn't work either.

And, is there a way to make nfs working with the pf scrub option? I'm
using pppoe and have a NAT, see

man 4 pppoe
Problems can arise on machines with private IPs connecting to the
Internet via a machine running both Network Address Translation (NAT) 
and

pppoe.

So in my pf.conf is
match on $ext_if scrub (max-mss 1280)

Is there any way to make nfs working on $ext_if?



NFS mount can't read files.

2011-02-06 Thread Pieter Verberne

Hello,

See thread at the bottom. I have also problems reading files while
mounting from Ubuntu. I cannot read files larger than +/- 18KB.

/etc/exports:
/home/pieter localhost 10.0.0.1 10.0.0.2 10.0.2.15

On Ubuntu:
$ sudo mount.nfs lilium:/home/pieter pieter_mount/ -w
$ cat pieter_mount/test.txt # 17069 bytes
[ output ]
$ cat pieter_mount/test1.txt# 18483 bytes
[ no output. cat keeps running; `ps aux | grep cat`
pieter3095  0.0  0.0   3896   244 pts/15   D+   15:35 0:00 cat 
pieter_mount/test1.txt ]


When I mount the same export on the OpenBSD machine it works fine:
$ sudo mount -t nfs localhost:/home/pieter/ /mount_test/
$ cat /mount_test/test1.txt
[output]

So could be an Ubuntu (and MacOS?) bug. I don't have another Unix/Linux
computer to try on right now.

Also, I'm not able to write on the exports. From both Ubuntu and
OpenBSD(localhost).

$ touch test
touch: cannot touch `test': Read-only file system

It says Read-only _file system_. Could this have anything to do with
file permissions or the -maproot -allmap options?

`portmap -d` and `mountd -d` gives no errors. I tried disabling pf. No
result. No interesting things in /var/log/messages

Regards,
 Pieter

OpenBSD lilium.garden 4.9 GENERIC#646 i386

[dmesg at bottom]

On Nov 28 00:19:42, Jason LaRiviere wrote:

Hello all,

Recently, my lazy ass went from 4.6-current snap to the most recent
4.8-current snap (#647: Fri Nov 26, amd64). Machine in question is
mostly a local file server, NFS to a few Macs. I say mostly, 'cause 
it

does some other stuff, and sits in a DMZ.

Since the upgrade to 4.8, I'm unable to read /some/ files from the 
nfs

server to the macs. I say some, because in testing I've been able to
ascertain the following:

1. I can write any size file from the mac to the nfs server. No 
issue.
2. I can write a small file (like 5 KiB), and read it back to the 
Mac.
3. I can write a large file (like 700 MiB), and cannot read it back 
to

the Mac.
4. I am unable to read any previously existing files on the NFS share

to

the Mac, whether they be large, or small.

Because the machine is in a DMZ, I made sure to disable the
DMZ-Internal filtering rules and stuff to rule out any stupidity.
Traffic dumps show no blocked packets.

While grasping at straws, I set vfs.nfs.iothreads=4. The
Mac is mounting the share as -o resvport,hard,intr,nolock.

The troubleshooting results thus far are just erratic enough to have

me
believe it's nothing I've done; nothing is making sense. I'm 
basically

looking for corroboration here. Can anyone else replicate this?


I am experiencing something similar on 4.8-current (server) and MacOSX
10.5.8 (client). I suspect the MacOSX to be the quilty one, as no other
NFS client shows any of these symptoms.

From the mac, I can write a file to the (auto)mounted share (/media)
and read it back, but I cannot read any of the files that existed there
before I mounted. A simple 'cat /media/.../file.txt' results in nothing
(the command is still running); after a while, a window pops up saying
'Server connection interrupted: media [Disconnect]'. I can _list_ the
content of the mounted share though.

I am (auto)mounting it with -resvport,noauto,nodev,noexec,noatime.
No filtering is done in between the boxes; they are on the same LAN,
pf is not running. I need to look at what exactly the mac firewall is
doing I guess.

Jan

* http://marc.info/?t=12909327164r=1w=2

OpenBSD 4.9-beta (GENERIC) #646: Tue Feb  1 19:02:04 MST 2011
t...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Geode(TM) Integrated Processor by AMD PCS (AuthenticAMD 
586-class) 500 MHz

cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX
real mem  = 536440832 (511MB)
avail mem = 517533696 (493MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/70/03, BIOS32 rev. 0 @ 0xfac40
pcibios0 at bios0: rev 2.0 @ 0xf/0x1
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc8000/0xa800
cpu0 at mainbus0: (uniprocessor)
amdmsr0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
io address conflict 0x6100/0x100
io address conflict 0x6200/0x200
pchb0 at pci0 dev 1 function 0 AMD Geode LX rev 0x33
glxsb0 at pci0 dev 1 function 2 AMD Geode LX Crypto rev 0x00: RNG AES
vr0 at pci0 dev 6 function 0 VIA VT6105M RhineIII rev 0x96: irq 11, 
address 00:00:24:cd:7d:f8
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
0x004063, model 0x0034
vr1 at pci0 dev 7 function 0 VIA VT6105M RhineIII rev 0x96: irq 5, 
address 00:00:24:cd:7d:f9
ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
0x004063, model 0x0034
vr2 at pci0 dev 8 function 0 VIA VT6105M RhineIII rev 0x96: irq 9, 
address 00:00:24:cd:7d:fa
ukphy2 at vr2 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
0x004063, model 0x0034
vr3 at pci0 dev 9 function 0 VIA VT6105M RhineIII rev 0x96: irq 12,