Symbolic link creation between 2 directories on different machines


 
Thread Tools Search this Thread
Operating Systems HP-UX Symbolic link creation between 2 directories on different machines
# 1  
Old 01-04-2012
Question Symbolic link creation between 2 directories on different machines

I am trying to link 2 directories using:
Code:
ln -s /net/<hostname>/srcdir/ /net/<desthostname>/dstdir/

I get the following error:
Code:
ln: /net/<desthostname>/dstdir: Function is not available

What is it that i am trying to do wrongly in the above operation?


Moderator's Comments:
Mod Comment Please use next time code tags

Last edited by vbe; 01-04-2012 at 12:57 PM.. Reason: code tags
# 2  
Old 01-04-2012
It seems an odd thing to do. Have you considered NFS to cross mount the required directory instead? You would need to share the directory from the server side, then mount it from the client. It will appear to everything except filesystem commands to just be there, so df output may look a bit odd and find $somedir -xdev might ignore things you're not expecting it to.

You will need to read the manual pages on your server for mount and that should lead you into how to share the directories you want. Depending on the OS, the way to share and the mount command can be different.

You will have to consider your backup processing, else you may take double backups and have trouble when you need to restore.

You will need to consider the mount options if you set this to re-mount at client boot. If you get it wrong or the sharing server is not available, then you can hang the boot process.


If you state your OS version(s) then we may be able to be more specific in suggestions.



I hoep that this helps.

Robin
Liverpool/Blackburn,
UK
# 3  
Old 01-04-2012
As mentionned above, NFS is your friend!
Decide who will export the filesytem/directory...use SAM if not confident with 1M commands
# 4  
Old 01-05-2012
Lightbulb

Quote:
Originally Posted by rbatte1
It seems an odd thing to do. Have you considered NFS to cross mount the required directory instead? You would need to share the directory from the server side, then mount it from the client. It will appear to everything except filesystem commands to just be there, so df output may look a bit odd and find $somedir -xdev might ignore things you're not expecting it to.

You will need to read the manual pages on your server for mount and that should lead you into how to share the directories you want. Depending on the OS, the way to share and the mount command can be different.

You will have to consider your backup processing, else you may take double backups and have trouble when you need to restore.

You will need to consider the mount options if you set this to re-mount at client boot. If you get it wrong or the sharing server is not available, then you can hang the boot process.


If you state your OS version(s) then we may be able to be more specific in suggestions.



I hoep that this helps.

Robin
Liverpool/Blackburn,
UK
Reference i used for the operation: Working with Filesystems

Client OS: HPUX B.11.23
Server OS: HPUX B.11.31

I am still unclear on the solution.
To clarify things,i am a newbie and would like to know whether it is necessary to mount a remote file system to create a symbolic link to a directory in that file system?

Can you provide any solution with the above information provided?

---------- Post updated at 02:18 PM ---------- Previous update was at 09:29 AM ----------

Hi i found a solution:

In Client machine:
$ ln -s /net/<serverIP>/<reqdir> /srcdir
$ cd srcdir
sh: srcdir: not found.

In Server:
Create a testdir containing: file1 file2 file3 file4
$ exportfs /testdir
exportfs: no entry for /testdir in /etc/dfs/dfstab

now open : /etc/dfs/dfstab and enter the following line

share -F nfs -o rw=<ClientIP>,ro /testdir

Now executing the same command
$ exportfs /testdir
$ exportfs
- /testdir rw=<ClientIP>,ro ""
The above output is from the file : /etc/dfs/sharetab file.

In Client:
# cd srcdir
# ls
file1 file2 file3 file4

Now you can access the /testdir in Server by accessing /srcdir in Client Machine.Smilie

NOTES:
File system sharing used to be called exporting on HP-UX, and exportfs
was used for exporting file systems. With the new share NFS model,
the share command replaces exportfs(1M) or /usr/sbin/exportfs.

Last edited by Amit Kulkarni; 01-05-2012 at 12:40 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to remove symbolic link?

this is my current code, # ln -s /lib64/ # ls -lrth total 80K -rw-r--r--. 1 root root 12K Jul 6 2012 post-install -rw-r--r--. 1 root root 552 Jul 6 2012 post-install.log -rw-------. 1 root root 1.5K Aug 21 2012 anaconda-ks.cfg drwxr-xr-x. 2 root root 4.0K Aug 21 2012 Videos... (3 Replies)
Discussion started by: jediwannabe
3 Replies

2. UNIX for Dummies Questions & Answers

Symbolic link

Hi, trying to understand more about symblic link, when I compiled a program called "match" in one folder ~/downloadsoftware/I want this program to be accessible like a system command by putting a symbolic link in /usr/bin/ Not by setting the $PATH method in .bashrc at this time. What I did is:... (4 Replies)
Discussion started by: yifangt
4 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. Shell Programming and Scripting

ls on a symbolic link

Hi all, Can anyone please confirm if the command below is the only way that I can get what the symbolic link is set to? mnlxd110(oracle)/db/posd2/dba$: ls -l | grep "^l" lrwxrwxrwx 1 oracle dba 28 Aug 9 2011 bdump -> diag/rdbms/posp1/posp1/trace mnlxd110(oracle)/db/posd2/dba$:... (7 Replies)
Discussion started by: newbie_01
7 Replies

5. Shell Programming and Scripting

Symbolic Link Help

Hello All, This may be a silly question to some but I am really stuck. Is there a way to reverse the following; sudo rm /bin/sh sudo ln -s /bin/bash /bin/sh It was part of a driver compile/installation procedure by Digi for Ubuntu stating that dash isn't supported and a symbolic link... (2 Replies)
Discussion started by: LAVco
2 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. Shell Programming and Scripting

symbolic link

Hi, i am trying to create sym links on sles 11 , but it seems i am doing something wrong. oracle@tests:/u01/app/oracle/oradata/ACIS> pwd /u01/app/oracle/oradata/ACIS oracle@tests:/u01/app/oracle/oradata/ACIS> ln -s /db/ACIS/dbase/dbf/ /u01/app/oracle/oradata/ACIS/... (2 Replies)
Discussion started by: tonijel
2 Replies

8. Solaris

How to copy a symbolic link

Hi I am trying to find a copy command that will copy a symbolic link itself and not what the link is actually pointing to. I am trying to copy a directory that has some symbolic links within it in IBM AIX unix this is achieved using cp -prh <source dir> <target> the 'h' flag is a hard copy... (3 Replies)
Discussion started by: jimthompson
3 Replies

9. UNIX for Dummies Questions & Answers

need some info about symbolic link and hard link

hello folks how y'all doin well i have some questions about symbolic link and hard link hope some one answer me i open terminal and join as root and i wrote ln -s blah blah then i wrote ls i see red file called blah blah but didn't understand what is this can some one explain and... (2 Replies)
Discussion started by: detective linux
2 Replies

10. UNIX for Dummies Questions & Answers

symbolic Link

question abt symbolic link ... i'm doing the following ... ln -s x.sh ./scripts/y.sh and cat ./scripts/y.sh it is giving following error cat: cannot open y.sh Any reason u an think of ? But it is working fine when i goto scripts directory and cretae the symbolic link. ... (1 Reply)
Discussion started by: bhargav
1 Replies
Login or Register to Ask a Question