Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • Last Modified:

Share a folder between 2 machines

Hi Experts,

I'd like to know if there is any way in which I can make a file system on one machine avaiable on another machine.

I got a help on Experts Exchange forum for networking. It was
  mount -o //192.168.0.1:/shareddir username=user password=xxxx /mnt/mountpoint

When I tried this out on my system giving a loop back address it worked fine. So I accepted the answer. But now when I try it on 2 different achines, I get an error saying
  mount: special device //192.168.0.1:/shareddir does not exist
though /shareddir exists on the system.

Is there any other way I can do it? Is there no way the machine that contains the folder make it available to the requesting machine?

Hope to get some help in this problem.

Thank you in anticipation,
Cherub
0
ur_cherub
Asked:
ur_cherub
  • 3
  • 3
  • 2
  • +2
1 Solution
 
owensleftfootCommented:
Im not sure you should have a colon before /sharedir
Are both systems linux?
0
 
pablouruguayCommented:
pcntfs ??
0
 
ur_cherubAuthor Commented:
Hi owensleftfoot,

Both are linux systems. When I exectued the program w/o the colon before /sharedir, that is, as
    mount -o //192.168.0.1/shareddir username=user password=xxxx /mnt/mountpoint

I got the following error
    mount: special device //192.168.0.1/shareddir does not exist

Hi pablouruguay,

I'm sorry. I didn't get what you meant by "pcntfs ??"

Cherub
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
aitzolCommented:
HAve you properly instaled and configured NFS and portmap???
0
 
owensleftfootCommented:
What does "showmount -e" on the box with sharedir give you?
0
 
Sachin_YashCommented:
Hi !!!

       For file sharing on linux m/c u have to start 2 services :-
        1. NFS & 2. portmap
       Secondly before u give command mount -o ...
       Just check it out that which file is shared by your m/c i.e. by :-
       # showmount -t localhost
  or for another m/c :-
       # showmount -t 'ipaddress'
  if it gives that your 192.168.0.1 share /sharedir then u can use mount it on your client m/c.
  if not then check it out in /etc/exports file whether u share that file or not.
       
         If your m/c say 192.168.0.2 want to share 192....0.1's  sharedir then use
    #mount -t nfs 192.168.0.1:/sharedir /localdir

         Where localdir is your dir(most probably emptydir) in your say 192.168.0.2 m/c

         For the permenent mount open /etc/fstab & insert one line as :-
 
      192.168.0.1:/sharedir      /localdir  nfs   defaults  0 0

       Try it .....
0
 
ur_cherubAuthor Commented:
Hi Sachin,

Thanks a lot. The NFS service was not running on my machine. Right now, my machine acts as the server and the client and the help that u gave me works perfectly. Don't have another system at the time being to check between 2 systems.

Will check it out on two systems and get back to u. but before that, I want to kno if the client machine also needs the NFS and portmap services to be running.

Thanks a lot for ur help. Hope to get the machine soon and try out what u say.

Cherub
0
 
Sachin_YashCommented:
Hi Cherub !!!

                U r most welcome !!!
                U have to run NFS & portmap service running on your client & server m/c.
                Actually what is happen, server m/c gives access to particular m/c say your 192.168.0.2 m/c.(as u r adding a line as

          /shardir  192.168.0.1
           in your /etc/export file.)
               To access that folder of the server u have to start nfs & portmap....

               Hope this information wil useful for you...
                 
0
 
ur_cherubAuthor Commented:
Hi Sachin,

Thanks a lot for ur help...

there is one correction that i'd make in ur help....
there is no -t option for "showmount"... it is the "-e" option...
other than for that it is perfect....

got a machine some time back... i tried without the NFS service running on the client machine and it worked perfectly... but the portmap service was required on both the client and the server side... and the NFS service on the server side alone...

thanks so much for the help.... u made my day... :)

Cherub
0
 
Sachin_YashCommented:
Hi Cherub !!!

             Thanks for your correction... Actually I'm confuse in mount -t nfs....  & showmount -e... that's why...

             However thanks again...
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now