Re: idiosyncratic "ln" not making hard links
On Wed, 2002-09-25 at 13:34, Vineet Kumar wrote:
> * Elizabeth Barham (soggytrousers@yahoo.com) [020925 09:24]:
> > "Noah L. Meyerhans" <noahm@debian.org> writes:
> >
> > > --zOcTNEe3AzgCmdo9
> > > Content-Type: text/plain; charset=us-ascii
> > > Content-Disposition: inline
> > > Content-Transfer-Encoding: quoted-printable
> > >
> > > On Wed, Sep 25, 2002 at 10:33:15AM -0500, Elizabeth Barham wrote:
> > > > > | :~$ touch k
> > > > > | :~$ ln k y
> > > >=20
> > > > Any idea of what might be causing ln not to work correctly on my
> > > > system?
> > >
> > > Try running strace on it:
> > > strace ln k y
> >
> > execve("/bin/ln", ["ln", "k", "y"], [/* 21 vars */]) = 0
> > uname({sys="Linux", node="shelby", ...}) = 0
> > brk(0) = 0x804d9a8
> > open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
> >
> > Should /etc/ld.so.preload be here?
>
> Yes, that's fine. (I mean it's fine that it tries to read it, and it's
> fine that it doesn't exist.)
>
> > stat64("y", 0xbffff1fc) = -1 ENOENT (No such file or directory)
> > lstat64("k", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> > lstat64("y", 0xbffff18c) = -1 ENOENT (No such file or directory)
> > lstat64("y", 0xbffff18c) = -1 ENOENT (No such file or directory)
> > link("k", "y") = -1 ENOENT (No such file or directory)
> > write(2, "ln: ", 4ln: ) = 4
> > write(2, "creating hard link `y\' to `k\'", 29creating hard link `y' to `k') = 29
> > write(2, ": No such file or directory", 27: No such file or directory) = 27
> > write(2, "\n", 1
> > ) = 1
> > _exit(1) = ?
> >
> > The only thing that seems odd in the stat64("y", 0xbffff1fc) in that
> > the file does not exist when, apparently, it should have been created
> > by then?
>
> No, that's not so. That first stat64 call is to see whether y already
> exists (in which case you'd get some error like "ln: 'y': file exists").
> If it didn't already exist, y is created as a link at the call to
> link("k","y") below that. The strange part (where it's failing) is that
> the call to link gives ENOENT instead of succeeding with 0.
>
> > I did have some sporadic memory errors with this machine but corrected
> > them although I have not run memtest in a while (the mmap).
>
> This could be it; it does do some 'mmap'ing, so memory errors could be
> affecting it. They can affect everything, in fact =)
>
> For lack of a better pointer, I'd say memtest86 should be the next thing
> to try. RAM's cheap these days, so don't sweat it too much.
>
> > Tried the fsck; it's still buggy.
>
> I take it you mean the fsck said the filesystem was fine, but ln still
> doesn't work? Is this the only symptom, or ar other things acting
> screwy on this machine as well?
>
> good times,
> Vineet
> --
> http://www.doorstop.net/
> --
> http://www.eff.org/
I'm going to toss in a *wild* question, but given that the actual link
attempt is failing, this wandered through the chasm I use as a mind:
What filesystem is on the partition on which the link is being made?
There isn't a chance that it is fat/vfat, is there?
--
Mark L. Kahnt, FLMI/M, ALHC, HIA, AIAA, ACS, MHP
ML Kahnt New Markets Consulting
Tel: (613) 531-8684 / (613) 539-0935
Email: kahnt@hosehead.dyndns.org
Reply to: