Re: You can't export non-ffs filesystems with NFS, and it isn't documented
[ Answering to a post from two and a half years back. :-) I was fiddling with nfs and stuff and remembered this thread. While reading it, I found out what the problem was. I realize (or at least hope) that Han is not still troubleshooting this issue, but for the archives... :-) ] Han Boetes wrote: Julian Leyh wrote: Han Boetes <[EMAIL PROTECTED]> wrote: I just noticed once again you can't export non-ffs filesystems with NFS. Well you can export them, but after mounting the partition on the client you won't see any files. I can't verify this behavior... mounted a msdos filesystem (usb stick) and exported it via nfs. i could mount and view all files on target nfs client. (server and client both -current). Odd... Could you be so kind to show me the lines of the msdos partition in /etc/fstab and in exports? I have: ~% grep msdos /etc/fstab /dev/sd0a /mnt/usb msdos rw,nodev,nosuid,noatime,noauto 0 0 ~% grep usb /etc/exports /mnt/usb/ -mapall=han:nfs marsupilami The problem is that nfs shares does not traverse file system mount points once initialized. Since nfs probably was started prior to mounting the msdos partition (with the noauto option in /etc/fstab), nfs would only share the contents of the mount point directory itself. A ``pkill -HUP mountd'' might help after mounting the msdos file system, in order to make mountd aware of the new file system "overriding" the mount point directory. /Alexander
Re: You can't export non-ffs filesystems with NFS, and it isn't documented
Alexander Hall wrote: > The problem is that nfs shares does not traverse file system > mount points once initialized. Since nfs probably was started > prior to mounting the msdos partition (with the noauto option in > /etc/fstab), nfs would only share the contents of the mount > point directory itself. > > A ``pkill -HUP mountd'' might help after mounting the msdos file > system, in order to make mountd aware of the new file system > "overriding" the mount point directory. I'm sorry, it doesn't work like you expect. On the OpenBSD server: ~% grep usb /etc/fstab /dev/sd0i /mnt/usb msdos rw,nodev,nosuid,noauto,noexec0 0 ~% grep usb /etc/exports /mnt/usb -maproot=han:nfs marsupilami ~% mount |grep usb /dev/sd0i on /mnt/usb type msdos (NFS exported, local, uid=1000, gid=0) ~% sudo pkill -HUP mountd ~% ls /mnt/usb foofile On the linux client: ~% mount G /mnt/usb haddock:/mnt/usb on /mnt/usb type nfs (rw,addr=172.16.11.1) ~% ls /mnt/usb # Han
Re: You can't export non-ffs filesystems with NFS, and it isn't documented
On Sun, Sep 30, 2007 at 11:28:59AM +0159, Han Boetes wrote: > ~% grep usb /etc/fstab > /dev/sd0i /mnt/usb msdos rw,nodev,nosuid,noauto,noexec0 0 > ~% grep usb /etc/exports > /mnt/usb -maproot=han:nfs marsupilami > ~% mount |grep usb > /dev/sd0i on /mnt/usb type msdos (NFS exported, local, uid=1000, gid=0) > ~% sudo pkill -HUP mountd > ~% ls /mnt/usb > foofile > > On the linux client: > > ~% mount G /mnt/usb > haddock:/mnt/usb on /mnt/usb type nfs (rw,addr=172.16.11.1) > ~% ls /mnt/usb You have to force the linux client to use NFS version 2: $ mount -o nfsvers=2 server:/foo/bar /mnt/baz There are 2 different bugs in the NFSv3 server implementation in OpenBSD which prevent a) exported msdosfs, ntfs & probably other non-unix filesystems b) exported ext2fs filesystems from working properly. For a) there's a fix in NetBSD(sys/nfs/nfs_serv.c:2831). For b) there's a fix in the kernel/5365 PR.
Re: You can't export non-ffs filesystems with NFS, and it isn't documented
Han Boetes wrote: > Alexander Hall wrote: >> The problem is that nfs shares does not traverse file system >> mount points once initialized. Since nfs probably was started >> prior to mounting the msdos partition (with the noauto option in >> /etc/fstab), nfs would only share the contents of the mount >> point directory itself. >> >> A ``pkill -HUP mountd'' might help after mounting the msdos file >> system, in order to make mountd aware of the new file system >> "overriding" the mount point directory. > > I'm sorry, it doesn't work like you expect. I stand corrected at this point. The file system to share is not ultimately determined at the time of mountd start up or (re-)configuration. However, it seems to be determined at the time of the nfs mount, so if the mount was performed prior to mounting the msdos file system, the client would only have access to the "parent" file system. I could not read from your earlier posts if this was the case. Some minor testing seem to indicate that the ``kill -HUP'' makes no difference at all unless the exports file has been changed. > On the OpenBSD server: > > ~% grep usb /etc/fstab > /dev/sd0i /mnt/usb msdos rw,nodev,nosuid,noauto,noexec0 0 > ~% grep usb /etc/exports > /mnt/usb -maproot=han:nfs marsupilami > ~% mount |grep usb > /dev/sd0i on /mnt/usb type msdos (NFS exported, local, uid=1000, gid=0) > ~% sudo pkill -HUP mountd > ~% ls /mnt/usb > foofile > > On the linux client: > > ~% mount G /mnt/usb > haddock:/mnt/usb on /mnt/usb type nfs (rw,addr=172.16.11.1) > ~% ls /mnt/usb I am not sure here either which mount (nfs vs msdos) was performed first. /Alexander