X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 25 Apr 2012 09:14:59 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Problems with nfs Message-ID: <20120425071459.GX25385@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4F9639D5 DOT 60200 AT samsung DOT com> <4F9653E9 DOT 2090307 AT samsung DOT com> <20120424073351 DOT GC17620 AT calimero DOT vinschen DOT de> <20120424141119 DOT GI25385 AT calimero DOT vinschen DOT de> <4F978E0B DOT 5080507 AT samsung DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4F978E0B.5080507@samsung.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Apr 25 09:39, Fedin Pavel wrote: > On 24.04.2012 18:11, Corinna Vinschen wrote: > > >An NFS client is a filesystem driver. There are companies > >providing such NFS clients, one of them Microsoft with SFU on > >pre-Vista and the NFS client in Vista/W7 Ultimate/Enterprise. > >Corinna > > BTW, IIRC in Cygwin we can mount SMB/CIFS shares using 'smbfs' in > the fstab. Why can't we do the same for NFS? You can, and you didn't read the User's Manual. See http://cygwin.com/cygwin-ug-net/using.html#mount-table, fifth paragraph: The third field describes the type of the filesystem. Cygwin supports any string here, since the file system type is usually not evaluated. So it doesn't matter if you write FAT into this field even if the filesystem is NTFS. Cygwin figures out the filesystem type and its capabilities by itself. I'm using NFS shares via Microsoft's NFS client all the time. A typical mount table entry looks like this: Y:/src /home/corinna/src foo binary 0 0 and the mount output for this looks like this: $ mount | grep src Y:/src on /home/corinna/src type nfs (binary,user) So, again, just to be clear, the content of the third field in /etc/fstab or /etc/fstab.d/$USER doesn't matter at all. Cygwin doesn't store it anywhere. It figures out the FS type by itself, regardless what's written in the fstab files. > And second point. Of course we can use SFU client, but there'll be > one problem. It won't expose symlinks etc correctly, because it's > Windows native thing. How do you know? Did you test it? Did you have a look into the code? Cygwin understands NFS symlinks just fine, and when it creates symlinks on NFS, these are *real* symlinks, not Cygwin-type fake symlinks. When it recognizes SFU NFS shares, it uses special functionality provided by the SFU NFS driver to read and create symlinks and to access file metadata on these shares. See here: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/nfs.h?rev=1.2&content-type=text/x-cvsweb-markup&cvsroot=src and here: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/nfs.cc?rev=1.3&content-type=text/x-cvsweb-markup&cvsroot=src and here: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_disk_file.cc?rev=1.376&content-type=text/x-cvsweb-markup&cvsroot=src (look for fhandler_base::fstat_by_nfs_ea(), fhandler_disk_file::fchmod(), fhandler_disk_file::mkdir(), fhandler_disk_file::opendir(), fhandler_disk_file::readdir()) and here: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/path.cc?rev=1.661&content-type=text/x-cvsweb-markup&cvsroot=src (look for symlink_worker(), symlink_info::check_nfs_symlink(), symlink_info::check()) Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple