X-Spam-Check-By: sourceware.org Message-ID: <45CA10E5.2090503@users.sourceforge.net> Date: Wed, 07 Feb 2007 11:48:21 -0600 From: Matthew Woehlke User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061206 Thunderbird/1.5.0.9 Mnenhy/0.7.4.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: ar 'unable to rename... Invalid cross-device link' References: <20070207105545 DOT GJ27843 AT calimero DOT vinschen DOT de> <20070207112943 DOT GL27843 AT calimero DOT vinschen DOT de> In-Reply-To: <20070207112943.GL27843@calimero.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 (I hope this gets through (and only once), gmane has been misbehaving all day...) Corinna Vinschen wrote: > On Feb 7 11:55, Corinna Vinschen wrote: >> On Feb 6 16:38, Matthew Woehlke wrote: >>> ...anyone have any guesses why rename() can't rename files in the same >>> directory, if the directory is an NFS mount? This causes 'ar' to fail >>> with the error: >>> >>> ar: unable to rename 'libcloudobj.a' reason: Invalid cross-device link >>> >>> I see this in strace with both 'ar' and 'mv': >>> >>> 46 371094 [main] ar 2588 rename: -1 = rename >>> (h:\<...path...>\src\objects\stWBl4pj, >>> h:\<...path...>\src\objects\libcloudobj.a) >>> >>> This seems to happen when the file already exists, but rename() only >>> fails on NFS mounts (not local drives). Is this a problem with 'ar', or >>> Cygwin's rename()? >> Since you're one of the few running NFS, you should also debug the >> situation further. Apparently the Cygwin rename function fails, but >> from your one-liner strace snippet there's no hint at all what happens. >> The error should have been mentioned a couple of lines before. You >> should also mention if you use a release version of Cygwin or a >> developer snapshot. You know http://cygwin.com/problems.html, don't >> you? > > I just installed SFU NFS for testing and, here it comes: > > "I can not reproduce rename failing on an NFS share." > > Maybe it's something with your permissions. > http://cygwin.com/acronyms/#SHTDI2(*) Thanks for trying. Sorry about forgetting the version info, although (and I forgot to mention this too, more apologies...) 'ren' in cmd.com also fails, which is why I am pretty sure the problem is that for some unknown reason, rename() (meaning Windows' API) fails on NFS if the target already exists, at least under whatever combinations of permissions I have... with error 17 (ERROR_NOT_SAME_DEVICE) of all things (which Cygwin translates to 18=EXDEV). I think the real question is 'should ar and/or Cygwin work around this apparent Windows bug'? D'oh! And I have more information... it only fails on Win2k3 (which means SUA, not SFU). I just tried on my XP machine and 'ar' succeeds. getfacl doesn't have much to say: $ getfacl.exe . # file: . # owner: mwoehlke # group: None user::rwx group::r-x other:r-x mask:rwx Cygwin version is 1.5.24(0.156/4/2) (are any of the other package versions really relevant?) -- Matthew We interrupt this e-mail to bring you a lame signature attempting to be witty. -- 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/