2001-11-20 02:07:03

by Ian Stirling

[permalink] [raw]
Subject: Can't link?

Rather odd thing happening right now, that I can't figure out.

Running 2.4.11 on a ext2 filesystem, with a couple of 40Gb drives, and
some NFS mounts.

After reading man link, I tried the following in /

bash-2.03# >1
bash-2.03# ls -l
total 0
-rw-r--r-- 1 root root 0 Nov 20 01:57 1
bash-2.03# ln 1 2
ln: cannot create hard link `2' to `1': No such file or directory

With strace:
stat("1", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
lstat("2", 0xbffff824) = -1 ENOENT (No such file or directory)
lstat("2", 0xbffff824) = -1 ENOENT (No such file or directory)
link("1", "2") = -1 ENOENT (No such file or directory)

I tried this with root, as shown above, when I encountered bizarre problems
due to tin not being able to rename files.


2001-11-22 13:35:34

by Colin Watson

[permalink] [raw]
Subject: Re: Can't link?

In article <[email protected]>, Ian Stirling wrote:
>Rather odd thing happening right now, that I can't figure out.
>
>Running 2.4.11 on a ext2 filesystem, with a couple of 40Gb drives, and
>some NFS mounts.
>
>After reading man link, I tried the following in /
>
>bash-2.03# >1
>bash-2.03# ls -l
>total 0
>-rw-r--r-- 1 root root 0 Nov 20 01:57 1
>bash-2.03# ln 1 2
>ln: cannot create hard link `2' to `1': No such file or directory

2.4.11 was badly broken (it's called 2.4.11-dontuse in the kernel
archives now). Have you tried later kernels?

--
Colin Watson [[email protected]]