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?

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

As mentionned above, NFS is your friend!
Decide who will export the filesytem/directory...use SAM if not confident with 1M commands

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=&lt;ClientIP&gt;,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.:b:

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.