Subject: Re: Trouble with NFS
From: [email-masked] (Will Parsons)
To: [email-masked]
Date: Tue, 15 Mar 2005 18:06:00 +0000 (UTC)

Robb, Sam wrote:
>> >   You want to start portmap with the '-F' flag - take a look
>> > at the /bin/nfs-server-config script for an example.  If you
>> > can back out your changes (uninstall portmap, etc. as services)
>> > and run the nfs-server-config script, that should put you in
>> > a working state (or at least, closer to a working state...)
>> > 
>> I think I *did* use the -F option - I was following the directions in
>> the nfs-server README.  In any case, I am now unable to get back to a
>> clean state.  Running 'cygrunsrv -E portmap' comes back with the same
>> message "Error stopping service &c.", and now portmap appears under
>> Window Services with status "Stopping".  As I stated, uninstalling
>> didn't work - setup reports nfs-server as not being installed, but
>> portmap.exe still shows up in /usr/sbin (perhaps because it's 
>> in use?).
> 
> Uninstalling nfs-server wouldn't uninstall portmap - that's part 
> of the sunrpc package, not the nfs-server package.  You may need
> to kill the portmap process in order to uninstall sunrpc properly,
> if it's running and not responding to service control commands.
> 
> Once it's killed, if cygrunsrv can't remove the service entry, you
> may need to excise it by hand (via regedit).

Thanks.  I uninstalled sun-rpc, killed cygrunsrv instances, and got back to
a pre-nfs state.  I then re-installed nfs-server and sun-rpc.  This time
restarting the daemons using the cygrunsrv commands in the README
succeeded, but attempting to mount exported directories seem to hang.
Trying the nfs-server-config script I get:

-------------------------------------------------------
Installing portmap as 'Cygwin portmap'
cygrunsrv: Error installing a service: OpenService:  Win32 error 1073:
The specified service already exists.

Installing mountd as 'Cygwin mountd'
Installing nfsd as 'Cygwin nfsd'

mount(1) command did not return SYSTEM mount(s).

It looks like you have installed Cygwin for a single user.
Cygwin mount points will not be available to programs installed
as Windows services. This will keep portmap, mountd, and nfsd
from running as Windows services.

In order for portmap, mountd and nfsd to function properly,
you should establish global mount points using the /bin/mount
utility. You can change user-specific Cygwin mount points to
global mount points using the following command:

    eval mount -f -s -b "C:/cygwin/usr/X11R6/lib/X11/fonts" "/usr/X11R6/lib/X11/fonts";
mount -f -s -b "C:/cygwin/bin" "/usr/bin";
mount -f -s -b "C:/cygwin/lib" "/usr/lib";
mount -f -s -b "C:/cygwin" "/";
mount -f -s -b "a:" "/a";
mount -f -s -b "c:" "/c";
mount -f -s -b "c:" "/exports/c";
mount -f -s -b "d:" "/exports/d";
mount -f -s -b "d:" "/d";
mount -f -s -b -E "p:" "/p";
mount -f -s -b "p:" "/exports/p";
mount -f -s -b -E "q:" "/q";
mount -f -s -b "q:" "/exports/q";
mount -f -s -b -E "s:" "/s";
mount -s -b --change-cygdrive-prefix "/cygdrive";

You current mount -m  listing is:

mount -f -s -b "C:/cygwin/usr/X11R6/lib/X11/fonts" "/usr/X11R6/lib/X11/fonts"
mount -f -s -b "C:/cygwin/bin" "/usr/bin"
mount -f -s -b "C:/cygwin/lib" "/usr/lib"
mount -f -s -b "C:/cygwin" "/"
mount -f -s -b "a:" "/a"
mount -f -s -b "c:" "/c"
mount -f -s -b "c:" "/exports/c"
mount -f -s -b "d:" "/exports/d"
mount -f -s -b "d:" "/d"
mount -f -s -b -E "p:" "/p"
mount -f -s -b "p:" "/exports/p"
mount -f -s -b -E "q:" "/q"
mount -f -s -b "q:" "/exports/q"
mount -f -s -b -E "s:" "/s"
mount -s -b --change-cygdrive-prefix "/cygdrive"
-------------------------------------------------------

I am confused about this information.  I *did* install Cygwin "for
everyone", and it looks like all the mounts are already system mounts,
despite what the script output says.  Output of mount:

-------------------------------------------------------
C:\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type system (binmode)
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
a: on /a type system (binmode)
c: on /c type system (binmode)
c: on /exports/c type system (binmode)
d: on /exports/d type system (binmode)
d: on /d type system (binmode)
p: on /p type system (binmode,noexec)
p: on /exports/p type system (binmode)
q: on /q type system (binmode,noexec)
q: on /exports/q type system (binmode)
s: on /s type system (binmode,noexec)
g: on /cygdrive/g type system (binmode,noumount)
h: on /cygdrive/h type system (binmode,noumount)
m: on /cygdrive/m type system (binmode,noumount)
n: on /cygdrive/n type system (binmode,noumount)
o: on /cygdrive/o type system (binmode,noumount)
v: on /cygdrive/v type system (binmode,noumount)
-------------------------------------------------------

After running nfs-server-config, portmap is started, mountd and nfsd are
not, but they start without error if started using the Windows Services
interface.

- Will

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/