Solved

The Missing Link

Posted on 2011-09-12
11
914 Views
Last Modified: 2013-11-17
I have two directories named /sunquest/bin and /usr/local/bin that are, apparently, linked. When I compare their content, it is identical. The problem is that I can't figure out how they're linked. I haven't found a soft link, and information I've found elsewhere claims that hard links to directories cannot be created. Regardless, this is what the ls command is showing me...

# ls -lid /usr/local/bin
   32 drwxr-xr-x   10 root     system         8192 Aug 15 12:13 /usr/local/bin
# ls -lid /sunquest/bin
   32 drwxr-xr-x   10 root     system         8192 Aug 15 12:13 /sunquest/bin

...but when I run find like this...

  find / -inum 32

... the /sunquest/bin directory shows up but /usr/local/bin does not.
0
Comment
Question by:babyb00mer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 250 total points
ID: 36525446
Maybe /usr/local and /sunquest are softlinked?
Given that /usr and / are  separate FSs hardlinks are not possible anyway.

wmp
0
 
LVL 38

Expert Comment

by:yuzh
ID: 36526863
It is a hardlink, since they are sharing the same inode and data.
0
 
LVL 62

Assisted Solution

by:gheist
gheist earned 125 total points
ID: 36530089
It shows 10 hard links to named directory, like subdirectories
ls -ld /sunquest
ls -ld /sunquest/bin
ls -ldi /sunquest/bin/*
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Assisted Solution

by:sjm_ee
sjm_ee earned 125 total points
ID: 36535261
One other possibility is that you can get these if the same directory has been mounted over two other directories:

# ls -lid mnt*
131177 drwxrwxrwx   3 root     sys             512 07 Jul 2008  mnt1
131177 drwxrwxrwx   3 root     sys             512 07 Jul 2008  mnt2
# mount
  node       mounted        mounted over    vfs       date        options
-------- ---------------  ---------------  ------ ------------ ---------------
<snip>
         /aix/cache       /aix/mnt1        namefs 14 Sep 11:34 rw
         /aix/cache       /aix/mnt2        namefs 14 Sep 11:34 rw
0
 

Author Comment

by:babyb00mer
ID: 36556750
I'll check that out.
0
 

Author Comment

by:babyb00mer
ID: 36556784
I've never mounted the same device in two different places. Usually, I get an error message stating that the device is already mounted. Is this a feature of AIX?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 36556851
You can't mount the same device twice on AIX, different mountpoints or not.
AIX will always tell you that the "... requested resource is busy".

And again, on AIX "/" and "/usr" are on different devices, so hardlinks between them are not possible, only symbolic links.
AIX will tell you that source and target "... are located on different file systems" if you try to hardlink them.

Moreover, hardlinks between directories are not allowed on AIX.
The error message will say that the source "... is a directory.  Cannot hard link" if you try.

The identical inode numbers must be the result of some very strange hazard, otherwise I, personally, couldn't explain them.

Anyway, please double check for symbolic links!

wmp



0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 250 total points
ID: 36556879
>> You can't mount the same device twice <<

but OK, as sjm_ee stated, you can mount a directory over a directory or a file over a file by means
of AIX's "namefs" functionality.

You stated that you never tried something similar, but please check with "mount" for the existence of "namefs" mounts anyway, as sjm_ee suggested above.


0
 

Author Comment

by:babyb00mer
ID: 36557060
I don't have access to the AIX system right now, but I'll check all of these things tomorrow,
0
 

Author Comment

by:babyb00mer
ID: 36561140
There are no "namefs" mounts.
0
 

Author Closing Comment

by:babyb00mer
ID: 36583578
Unfortunately, I never really solved this riddle. It remains a mystery. Everything suggested by the experts was reasonable, just not applicable.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux : adding the new user with password option, 11 126
dot directory in FreeBSD??? 4 91
check unix curl command return value 7 192
How to Insert a File Using Text Editor 9 102
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question