• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 916
  • Last Modified:

symbolic links across servers

hello,

i have access to 2 servers, and what i need to do is to read some data from 1 server to another, so hence i need a symbolic link (so i assume). i have read the man ln, and info ln and neither tell how to do this, there is alot of info on how to make a link from one file to another.. but nothing on between two servers.

the path in the server 1 is:
/usr/home/tb/here
the path on server 2 is:
/usr/home/trib/cgi-bin/here_2

how do i get server 2 to get data from a file in the directory "here" in server 1 from the location of "here_2" on server 2.

thank you for any help on this matter.

Randor
0
randor1973
Asked:
randor1973
1 Solution
 
superschlonzCommented:
A link only doesn't work, you also need a network filesystem.
There are at least 4 possibilities: Coda, NFS, SMB and NCP.

I think the easyest way to do it is using NFS.
You have to setup a NFS server on server 2 and add a line to
its file /etc/exports:

/usr/home/trib/cgi-bin/here_2 (rw)

Perhaps you have to add some more options (see in the manual
of exports). I have the following line here in my config:

/home/mf 192.168.2.0/255.255.255.0(rw,all_squash,anonuid=500,anongid=100)

this means only from the specified net access is allowed. The options are:
rw = read/wrtie
all_squash = all users are squashed to the anon user
anonuid=500  = use the user id 500 for accessing files
anongid=100  = use the group id 100 for accessing files

I think you have to restart nfsd after this change.
On server 1 you can mount this export with the following line:

mount server2:/usr/home/trib/cgi-bin/here_2 /usr/home/tb/here

(the directories must exist before mounting)
Now you should see the files from the other server in the directory
usr/home/tb/here.

You can also add a line to /etc/fstab so you don't have to login as root
to mount and unmount this directory:

server2:/usr/home/trib/cgi-bin/here_2  /usr/home/tb/here  nfs  noauto,user 0 0

(should be on one line)
Now any user should be able to mount or unmount it:

mount /usr/home/tb/here
umount /usr/home/tb/here
0
 
randor1973Author Commented:
thank you for your help, although upon reading your answer i realized that this project was beyond my scope.. so i have found a person to do this task for me.. thank you once again...
0

Featured Post

Independent Software Vendors: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now