Hello, I installed a system with opensuse 12.1 with the following partitions:
/ dev/sda2 /
/ dev/sda3 / tmp
/ dev/sda6 / home
/ dev/sda5 / var
I have the following problem: I can not create hard links to /var and /.
If I try, for example, ln-s “/var/log/messages /tmp” and then I do “file /tmp/messages” I get “symbolic link in a loop” and I can not access the file.
> I have the following problem: I can not create hard links to /var and
> /.
No, you can not create hard links across filesystem. Impossible since/for ever.
> If I try, for example, ln-s “/var/log/messages /tmp” and then I do
> “file /tmp/messages” I get “symbolic link in a loop” and I can not
> access the file.
You can not link a file to an existing directory, either.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
No, you can not create hard links across filesystem. Impossible since/for ever.
Which is why symlinks were created in BSD oh, so long ago. IIRC it’s because with with hard links, the only thing that’s placed in the directory entry is the inode # of the beginning file (everything’s a file in unix) and the inode # is only unique within a given filesystem.
BTW-
ln-s “/var/log/messages /tmp”
(I assume you meant ln -s) doesn’t create a hard link. The -s option creates a symbolic link.
On 2011-12-10 22:56, ken yap wrote:
> robin_listas;2416561 Wrote:
>> You can not link a file to an existing directory, either.
>
> Actually you can, but he did something wrong with the syntax. I don’t
> know what’s with the quotes in his post.
Ah, I see. It does not link to the directory, but creates a symlink instead
with the name of the file.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
>> Why do you want that kind of link anyway, OP?
>
> This is a example. The question is for qmail install…I can’t create
> the correct link from /var/qmail/ to /usr/bin (qmailctl etc…etc…)
It simply impossible to create hardlinks like that with your partitioning.
It is designed that way. You can create softlinks instead.
If qmail can not handle that situation, it is a bug with them.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)