How to Link FS to 2 directories?


 
Thread Tools Search this Thread
Operating Systems AIX How to Link FS to 2 directories?
# 1  
Old 05-18-2011
Question How to Link FS to 2 directories?

Hi Experts,

How do i link FS /lhome to 2 directories /u and /home .

Please advise.
Many Thanks,
RG
# 2  
Old 05-18-2011
you can use soft links.

Code:
ln -s /lhome /u
ln -s /lhome /home

# 3  
Old 05-18-2011
Hi,

I have managed to link /u to /lhome but not /home, have an error below

Code:
#  ls -lrt u
lrwxrwxrwx    1 root     system            6 May 18 13:57 u -> /lhome

Code:
 
#  ln -s /lhome /home
ln: Function not implemented


Last edited by EngnrRG; 05-27-2011 at 01:37 AM..
# 4  
Old 05-19-2011
Quote:
How do i link FS /lhome to 2 directories /u and /home
As I don't think this is possible as worded, what are you trying to achieve?
# 5  
Old 05-19-2011
Hi Methyl,

thanks for the reply. as by default, /lhome FS is created by build, and mostly users has home directory of /u and /home. Would it be possible to link both this directory to /lhome?

Thanks
# 6  
Old 05-20-2011
Sorry, but your question imples an impossible solution.

Are /lhome , /u and /home all separately mounted local filesystems which appear as separate lines in "df" ?

What are you trying to achive?

I have in the past linked say /home/myuser to another filesystem where a user wanted more disc space and had programs which expected /home/myuser. Is this the sort of thing?

Sorry, but your question imples an impossible solution.

Are /lhome , /u and /home all separately mounted local filesystems which appear as separate lines in "df" ?

What are you trying to achive?

I have before linked say /home/myuser to another filesystem where a user wanted more disc space and had programs which expected /home/myuser. Is this the sort of thing?


After re-reading your posts. Maybe you have a filesystem called /lhome but do not have filesystems called /u and /home?
In this circumstance the "ln -s" commands in post #2 should have worked. If /home existed already (or perhaps /lhome is a file not a directory) then that is why the command failed.
Can we check with:
Code:
ls -lad /lhome
ls -lad /home
ls -lad /u
df -k       # Or whatever the command is on your system to give free space in all filesystems


Last edited by methyl; 05-20-2011 at 09:22 AM..
# 7  
Old 05-27-2011
Hi

your /home is currently a mount - this you cannot relink or overwrite ...

you need to do following

Code:
rm /u
umount /home
rmdir /home
ln -s /lhome home
ln -s /lhome u

That will give you exactly what you are looking for. If you cannot umount /home, stop automouter for a short while

Regards
zxmaus
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

/var/adm/messages (insterface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages Apr 22 16:43:05 Prod-App1 in.routed: interface net0 to 172.16.101.1 turned off Apr 22 16:43:33 Prod-App1 mac: NOTICE: nxge0 link up, 1000 Mbps, full duplex Apr 22 16:43:34 Prod-App1 mac: NOTICE: nxge0 link... (2 Replies)
Discussion started by: javeedkaleem
2 Replies

2. Solaris

/var/adm/messages (interface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# cat /var/adm//messages Apr 20 03:10:01 Prod-App1 syslogd: line 25: WARNING: loghost could not be resolved Apr 20 08:24:18 Prod-App1... (0 Replies)
Discussion started by: javeedkaleem
0 Replies

3. UNIX for Dummies Questions & Answers

[Solved] Symbolic link not allowed or link target not accessible

Hi everybody, I read about treads realted to this issue but they did not resovle issue given below. Please help me resolve issue given below I have html file under /srv/www/htdocs/actual_folder ls actual_folder/ test.html and following link works... (0 Replies)
Discussion started by: newbielgn
0 Replies

4. Programming

g++ fails to link to static library when compilation and link in single command

Hello All, I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it: I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies

5. HP-UX

Symbolic link creation between 2 directories on different machines

I am trying to link 2 directories using: ln -s /net/<hostname>/srcdir/ /net/<desthostname>/dstdir/ I get the following error: ln: /net/<desthostname>/dstdir: Function is not available What is it that i am trying to do wrongly in the above operation? Please use next time code tags (3 Replies)
Discussion started by: Amit Kulkarni
3 Replies

6. UNIX for Dummies Questions & Answers

How two directories are linked (not symbolic link)

Hi, I'm trying to understand a "strange" setup: on one of the systems, when I cd into a directory, /data/logs, it takes me into /data/uat/logs (instead of /data/logs). These two directories are not symbolicly linked. Here's what I have: In /data, "ls -li" shows (among other things): ... (6 Replies)
Discussion started by: chenghui
6 Replies

7. UNIX for Dummies Questions & Answers

Difference between hard link and soft link

Hi Experts, Please help me out to find out difference between a hard link and a soft link. I am new in unix plz help me with some example commands ( for creating such links). Regards S.Kamakshi :) (2 Replies)
Discussion started by: kamakshi s
2 Replies

8. UNIX for Dummies Questions & Answers

link field for directories

Hi everybody . I am a newbie in UNIX. I understood the concept of unix system files . For normal files , the link field is the number of hard links that points to this file. But there is no hard links for directories so what is the meaning of link field tor those directories? Thanks (5 Replies)
Discussion started by: remid1985
5 Replies

9. UNIX for Dummies Questions & Answers

Difference between hard link and soft link in unix

Hi All, Can any one please explain me what is the difference between hard link and soft link in UNIX. Thanks in advance Raja Chokalingam. (2 Replies)
Discussion started by: RAJACHOKALINGAM
2 Replies

10. UNIX for Advanced & Expert Users

Differences between hard link and soft link

Hi all! I'd like to know the differences between hard links and soft links. I've already read the ln manpage, but i'm not quite sure of what i understood. Does a hard link sort of copy the file to a new name, give it the same inode number and same rights? What exactly should I do to do this:... (3 Replies)
Discussion started by: penguin-friend
3 Replies
Login or Register to Ask a Question