This is the mail archive of the
mailing list for the Cygwin project.
RE: Starting with Cygwin NFS Server
- From: "Robb, Sam" <sam dot robb at timesys dot com>
- To: <cygwin at cygwin dot com>
- Date: Mon, 12 Dec 2005 13:13:49 -0500
- Subject: RE: Starting with Cygwin NFS Server
> > The doc you mentioned above is the README for the original
> > nfs-server package. There is a cygwin-specific README for
> > the nfs-server package as well, under:
> > /usr/share/doc/Cygwin/nfs-server-2.3-3.README
> Perhaps the foloowing question is off-topic.
Not quite, I don't think...
> NFS Client runs on UNIX.
> Cygwin NFS Server runs on Windows.
> How to specify the device (Windows-directory/folder) to be mounted on
> mount point (UNIX-directory)?
> The problem is how to set the pathname of the exported file system on
> Windows NFS Server.
> For UNIX NFS Server the pathname might be set as it follows
> <IP address of UNIX machine>:/dir1/dir2
> For instance, Windows machine contains folder C:\folder1\folder2 that
> is to be exported.
> How to set the pathname? What to do with "C:"?
> <IP address of UNIX machine>:C:\folder1\folder2
No - the nfs-server is a cygwin service, and so works with cygwin
paths. As a quick example, let's say you want to export two
directories, public and private:
You can use the cygpath utility to translate the Windows paths
into cygwin paths:
$ cygpath -u 'C:\exports\public'
$ cygpath -u 'C:\exports\private'
Now, you can edit your /etc/exports file to export these two
/cygdrive/c/exports/public 192.168.1.100(ro map_static=/etc/nfs/server.map)
/cygdrive/c/exports/private 192.168.1.100(rw map_static=/etc/nfs/server.map)
After this, you can start the portmap, mountd, and nfsd. On
the UNIX machine, you would mount the directories as usual, ex:
$ mount -t nfs <IP address of cygwin machine>:/cygdrive/c/exports/public /mnt/nfs/public
$ mount -t nfs <IP address of cygwin machine>:/cygdrive/c/exports/private /mnt/nfs/private
Simple as pi :-/
Note that there are potential issues with exporting a regular old
Windows directory (ex, the '/cygdrive/c/...' type paths). Please
read the docs for some additional info on this. If you can arrange
your exports so that they are from under the cygwin root directory,
mkdir -p /exports/public
mkdir -p /exports/private
... then everything is a little easier. In this case, aside from
avoiding potnetial problems, your /etc/exports look a little cleaner:
/exports/public 192.168.1.100(ro map_static=/etc/nfs/server.map)
/exports/private 192.168.1.100(rw map_static=/etc/nfs/server.map)
... and the client mount commands are a little less verbose:
$ mount -t nfs <IP address of cygwin machine>:/exports/public /mnt/nfs/public
$ mount -t nfs <IP address of cygwin machine>:/exports/private /mnt/nfs/private
Hope that helps,
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html