On 5/14/07, Ben Calvert <[EMAIL PROTECTED]> wrote:

On May 13, 2007, at 8:44 PM, David Higgs wrote:

> I've tried to configure NFS and am nearly all the way there, but it
> seems like I've hit a pretty big stumbling block.  I've got OpenBSD
> 4.1-stable (10.0.0.1) with an NFS export of my home directory.  I also
> have a Windows XP machine (10.0.0.2) and installed the SFU 3.5 NFS
> client.

Are most of your clients going to be windows machines?  if so, you
should thing seriously about using samba.

This is my private network and I've used samba previously; I'm just
trying to learn how to configure NFS.  I'll go back to samba if I
can't figure this out.

( you should also read http://www.openbsd.org/mail.html and include
all even vaguely related config files and output of things like dmesg
and nfsstat )

I've googled quite a bit on this as well as searched MARC.  I don't
know any other files to include other than /etc/exports.

[EMAIL PROTECTED] dmesg
OpenBSD 4.1 (GENERIC) #1435: Sat Mar 10 19:07:45 MST 2007
   [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium III ("GenuineIntel" 686-class, 512KB L2 cache) 599 MHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real mem  = 267993088 (261712K)
avail mem = 236847104 (231296K)
using 3302 buffers containing 13524992 bytes (13208K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+ BIOS, date 10/13/00, BIOS32 rev. 0 @
0xfd790, SMBIOS rev. 2.1 @ 0xefa30 (49 entries)
bios0: Dell Computer Corporation XPST600
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 30102 dobusy 0 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xfd790/0x870
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf20/192 (10 entries)
pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371FB ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0xb800 0xcb800/0x800 0xcc000/0x800
0xe0000/0x4000! 0xe4000/0xc000
acpi at mainbus0 not configured
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x03
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "NVIDIA GeForce3" rev 0xa3
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA,
channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <Maxtor 52049H3>
wd0: 16-sector PIO, LBA, 19473MB, 39882528 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <SONY, CD-RW CRX100E, 1.0n> SCSI0
5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
uhci0 at pci0 dev 7 function 2 "Intel 82371AB USB" rev 0x01: irq 9
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x02: SMI
iic0 at piixpm0
emu0 at pci0 dev 14 function 0 "Creative Labs SoundBlaster Live" rev 0x05: irq 3
ac97: codec id 0x54524123 (TriTech Microelectronics TR28602)
audio0 at emu0
"Creative Labs PCI Gameport Joystick" rev 0x05 at pci0 dev 14 function
1 not configured
skc0 at pci0 dev 16 function 0 "3Com 3c940" rev 0x10, Yukon (0x1): irq 9
sk0 at skc0 port A, address 00:0a:5e:5c:50:41
eephy0 at sk0 phy 0: Marvell 88E1011 Gigabit PHY, rev. 3
xl0 at pci0 dev 17 function 0 "3Com 3c905C 100Base-TX" rev 0x74: irq
10, address 00:01:03:c3:66:4e
bmtphy0 at xl0 phy 24: Broadcom 3C905C internal PHY, rev. 6
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask fb65 netmask ff65 ttymask ffe7
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
ugen0 at uhub0 port 1
ugen0: APC Back-UPS ES 750 FW:819.z2.D USB FW:z2, rev 1.10/1.06, addr 2
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
uhub1 at uhub0 port 2
uhub1: ATEN International product 0x7000, rev 1.10/1.00, addr 3
uhub1: 4 ports with 4 removable, self powered
uhidev0 at uhub1 port 1 configuration 1 interface 0
uhidev0: Logitech USB Receiver, rev 1.10/21.00, addr 4, iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub1 port 1 configuration 1 interface 1
uhidev1: Logitech USB Receiver, rev 1.10/21.00, addr 4, iclass 3/1
uhidev1: 4 report ids
ums0 at uhidev1 reportid 1: 16 buttons and Z dir.
wsmouse0 at ums0 mux 0
uhid0 at uhidev1 reportid 2: input=2, output=0, feature=0
uhid1 at uhidev1 reportid 3: input=1, output=0, feature=0
uhid2 at uhidev1 reportid 4: input=3, output=0, feature=0
uhidev2 at uhub1 port 2 configuration 1 interface 0
uhidev2: Tangtop USBPS2, rev 1.10/0.01, addr 5, iclass 3/1
ukbd1 at uhidev2: 8 modifier keys, 6 key codes
wskbd2 at ukbd1 mux 1
wskbd2: connecting to wsdisplay0
uhidev3 at uhub1 port 2 configuration 1 interface 1
uhidev3: Tangtop USBPS2, rev 1.10/0.01, addr 5, iclass 3/1
uhidev3: 3 report ids
ums1 at uhidev3 reportid 1: 5 buttons and Z dir.
wsmouse1 at ums1 mux 0
uhid3 at uhidev3 reportid 2: input=2, output=0, feature=0
uhid4 at uhidev3 reportid 3: input=1, output=0, feature=0

[EMAIL PROTECTED] rpcinfo -p
  program vers proto   port
   100000    2   tcp    111  portmapper
   100000    2   udp    111  portmapper
   100003    2   udp   2049  nfs
   100003    3   udp   2049  nfs
   100003    2   tcp   2049  nfs
   100003    3   tcp   2049  nfs
   100005    1   udp    626  mountd
   100005    3   udp    626  mountd
   100005    1   tcp    929  mountd
   100005    3   tcp    929  mountd

[EMAIL PROTECTED] nfsstat
Client Info:
Rpc Counts:
 Getattr   Setattr    Lookup  Readlink      Read     Write    Create    Remove
       8         0       136         0         0         0         1         1
  Rename      Link   Symlink     Mkdir     Rmdir   Readdir  RdirPlus    Access
       0         0         0         0         0         8         0        39
   Mknod    Fsstat    Fsinfo  PathConf    Commit
       0         3         2         0         0
Rpc Info:
TimedOut   Invalid X Replies   Retries  Requests
       0         0         0         0       198
Cache Info:
Attr Hits    Misses Lkup Hits    Misses BioR Hits    Misses BioW Hits    Misses
     168         8        13       136         0         0         0         0
BioRLHits    Misses BioD Hits    Misses DirE Hits    Misses
       0         0         0         0         4         4

Server Info:
 Getattr   Setattr    Lookup  Readlink      Read     Write    Create    Remove
     213         0       291        26      7529         0        21         1
  Rename      Link   Symlink     Mkdir     Rmdir   Readdir  RdirPlus    Access
       0         0         0        29         0        41       188        39
   Mknod    Fsstat    Fsinfo  PathConf    Commit
       0        97         8         6         0
Server Ret-Failed
             198
Server Faults
           0
Server Cache Stats:
  Inprog      Idem  Non-idem    Misses
       0         0         0      8499
Server Write Gathering:
WriteOps  WriteRPC   Opsaved
       0         0         0

On the XP side:
Z:\>mount

Local    Remote                                 Properties
-------------------------------------------------------------------------------
Z:       \\10.0.0.1\home\david              UID=1000, GID=31
                                               rsize=32768, wsize=32768
                                               mount=soft, timeout=1.0
                                               retry=1, locking=no
                                               fileaccess=755, lang=ANSI
                                               casesensitive=no

Z:\>mkdir test
The media is write protected.

After a failed mkdir from my windows side: Server[GetAttr, Mkdir, and
Ret-Failed] went up by one; Server Cache Misses went up by two.


>
> [/etc/exports]
> /home/david -mapall=david:guest -network=10.0.0.0 -mask=255.255.255.0

i notice you're using 'david:guest' here... the first question
springs to mind is to verify that user david is in group guest?

[EMAIL PROTECTED] id
uid=1000(david) gid=31(guest) groups=31(guest), 0(wheel)


>
> I can successfully mount this share locally and perform both reads
> and writes.
>
> Without any of SFU's User Name Mapping configured, I can mount the
> share with uid/gid of -2/-2 as advertised.  Appropriately, I cannot
> access any files or directories that are not world-readable.  However,
> inside a chmod-777 directory, I cannot create files or directories
> (which might be as expected).
>
> After configuring User Name Mapping to map my Windows account to the
> UNIX account, I can mount the share with the expected uid/gid.

Please provide specifics?  do you mean with the david:guest uid:gid
mentioned above?

Yes.  When I map the drive through Explorer, it prompts me to confirm
the uid:gid I am connecting with (1000:31) or to select a different
one.


> Although I can read user-only files and directories, I still cannot
> create any files or directories.

what user:group are the parent directory?  david:guest, or something
like david:david ? what permissions are they?

[EMAIL PROTECTED] ls -ld /home/david
drwxr-xr-x  21 david  guest  1024 May 13 23:11 /home/david


>   Windows keeps reporting that the
> drive has write-protection enabled.
>

What do the log files on the server say?

Absolutely nothing.  I can mount, read, try to write, and unmount all
without generating a single log message in
/var/log/{messages,daemon,secure}.  I'll try running portmap and
mountd in debug mode tomorrow and see if anything jumps out at me.


> I know this isn't a SFU help forum, but any ideas to try or tips on
> troubleshooting the NFS side is more than welcome.  Thanks in advance.
>
> --david
>
> P.S. On an unrelated sidenote, does mountd always bind to the same
> ports by default?

man mountd
( http://www.openbsd.org/cgi-bin/man.cgi?
query=mountd&apropos=0&sektion=0&manpath=OpenBSD
+Current&arch=i386&format=html )
will answer this for you

The man page says to read the RFCs; the RFCs say to ask the
portmapper; this confirms my original guess of "don't bet on it".


> If not, is there a way to fix them at certain
> values, so that PF rules can be written to match?  Linux rpc.mountd(8)
> supposedly has a -p option that can be used for this purpose.

Reply via email to