Trouble sharing an msdos mount via NFS

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Trouble sharing an msdos mount via NFS

Tim Chase-5
I have three HDDs in my junker box ("quentin") running stock
OpenBSD 3.7.  I've got two NFS exports of mounted drives:
one FFS, one msdos.  When importing the msdos drive, I can't
"ls" the files, but I have no trouble copying files off of
it, as long as I know/specify the explicit pathname.  When
exporting the FFS side of things, everything works just fine.

Details:

All the OpenBSD stuff is on the 1st HDD.  The 2nd HDD is
fully FFS formatted, as one grand partition with one grand
slice in on it.  The 3rd HDD is an MS-Dos formatted
partition with a whole slew of MP3s I've gathered over the
years (yanked from duty in a previous machine in a previous
lifetime).

My aim was to simply share the MS-Dos drive via NFS to the
other machines in my house.

 From my /etc/fstabs:
-----------------------------------------
/dev/wd0a / ffs rw 1 1
/dev/wd0d /home ffs rw,nodev,nosuid 1 2
/dev/wd0e /tmp ffs rw,nodev,nosuid 1 2
/dev/wd0g /usr ffs rw,nodev 1 2
/dev/wd0f /var ffs rw,nodev,nosuid 1 2
/dev/cd0a /mnt/cd cd9660 ro,nodev,nosuid 0 0
/dev/wd1a /mnt/hd1 ffs ro,nodev,nosuid 1 2
/dev/wd2i /mnt/hd2 msdos ro,nodev,nosuid 1 2
-----------------------------------------
The last two lines being the items in question.

Now everything gets mounted correctly and I can access all
the files correctly locally.

I then export them via NFS (/etc/exports):
-----------------------------------------
/mnt/hd1 -ro -mapall=nobody
/mnt/hd2 -ro -mapall=nobody
-----------------------------------------

 From other machines they all appear fine/uneventfully when
doing a "showmount -e" on both the local machine
-----------------------------------------
Exports list on localhost:
/mnt/hd2                           Everyone
/mnt/hd1                           Everyone
-----------------------------------------

and from the remote machine ("rubbish", a Linux box, running
Debian Testing)
-----------------------------------------
rubbish:~# showmount -e quentin
Export list for quentin:
/mnt/hd1 (everyone)
/mnt/hd2 (everyone)
-----------------------------------------

All good so far.

HOWEVER:  when I mount the remote file systems, I can see
the contents of the mounted /mnt/hd1 (the FFS drive), but
can't see the contents of /mnt/hd2 (the MSDOS drive) when
trying to do a "ls" on the drive.  Both hd1 and hd2 have the
same contents at the moment (after a lengthy "cp -R" of
copying the whole lot, though hd1 is smaller and reported
back that it's full, so it's not *everything on hd2).  Both
are exposed and mounted with the same privs, AFAICT:

Exported directory permissions on the OpenBSD side (which
may or may not matter, given the /etc/fstab from above, but
I ensured that I set them to the same, just to eliminate a
possibility):
-----------------------------------------
tim@quentin$ ls -lsFa /mnt
2 drwxr-xr-x   4 1002  1002    512 Feb 28 10:07 hd1/
8 drwxr-xr-x   1 1002  1002   4096 Dec 31  1979 hd2/
-----------------------------------------

Checking matters on the Debian side of things:
-----------------------------------------
root@rubbish# ls -lsFa /mnt
4 drwxr-xr-x   1 tim tim 4096 Dec 31  1979 dos/
1 drwxr-xr-x   4 tim tim  512 Feb 28 10:07 ffs/

root@rubbish# mount -t nfs quentin:/mnt/hd1 /mnt/ffs
root@rubbish# mount -t nfs quentin:/mnt/hd2 /mnt/dos

root@rubbish# mount | grep quentin
quentin:/mnt/hd on /mnt/ffs type nfs (rw,addr=192.168.3.14)
quentin:/mnt/hd2 on /mnt/dos type nfs (rw,addr=192.168.3.14)

root@rubbish# ls -lsFa ffs
total 7
1 drwxr-xr-x   4 tim       tim  512  Feb 28 10:07 ./
4 drwxr-xr-x   5 root      root 4096 Mar 10 15:24 ../
1 drwxr-xr-x   5 root      tim  512  Feb 28 10:06 Mellow/
1 drwxr-xr-x  11 root      tim  512  Feb 28 10:04 Other/

root@rubbish# ls -lsFa dos
total 0
-----------------------------------------

However, I know for certain that there are files in /mnt/hd2
that *should* be available, when looked at from the OpenBSD
side of things:
-----------------------------------------
tim@quentin$ ls -lsFa /mnt/hd1
total 28
8 drwxr-xr-x  1 1002  1002      4096 Dec 31  1979 ./
4 drwxr-xr-x  6 root  wheel      512 Feb 28 08:34 ../
8 drwxr-xr-x  1 1002  1002      4096 Feb 10 08:44 Mellow/
8 drwxr-xr-x  1 1002  1002      4096 Feb 10 08:36 Other/

tim@quentin$ ls -lsFa /mnt/hd2
total 28
8 drwxr-xr-x  1 1002  1002      4096 Dec 31  1979 ./
4 drwxr-xr-x  6 root  wheel      512 Feb 28 08:34 ../
8 drwxr-xr-x  1 1002  1002      4096 Feb 10 08:44 Mellow/
8 drwxr-xr-x  1 1002  1002      4096 Feb 10 08:36 Other/
-----------------------------------------

Strangely, the files are accessible, I just can't ls them:
-----------------------------------------
tim@rubbish$ cp /mnt/dos/Other/BSD/SONG34.OGG ~
-----------------------------------------

works perfectly fine, dropping SONG34.OGG in my home directory.

I can post complete output of a variety of matters if needed
(dmesg output, output of various probing commands or other
tests) but this has already grown to a rather lengthy post.

Is there something obvious I'm missing, or is this truely a
bug?  I found a similar thread:

http://groups.google.com/group/lucky.openbsd.misc/browse_thread/thread/bd6d2d7361de2b5d/40a81d5bd79df8d7

but the author, Han, hadn't gotten any resolution on the matter.

Thanks for taking the time to look at into this (or at least
read this far :)

-tim