Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Originally Posted by Juan Pablo Try NFS, it's great!! I know this is a silly question, but how do you actually do that?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2011
    Posts
    10

    NFS


    Quote Originally Posted by Juan Pablo View Post
    Try NFS, it's great!!
    I know this is a silly question, but how do you actually do that?

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Hello and Welcome.
    I've moved your post here for better exposure.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Just Joined!
    Join Date
    Sep 2011
    Posts
    10
    Quote Originally Posted by MikeTbob View Post
    Hello and Welcome.
    I've moved your post here for better exposure.
    Thanks.

    I suspect the answer is so obvious that I can't see it for looking, but I can't.

    The daft thing is that that they can both see a windows box on the same network and I can set up a windows shared folder on the Linux box that they can all see.
    I just can't see how to do it natively.

  4. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,110
    Are you trying to use nfs to network two or more Linux machines?

    There are a lot of tutorials on the internet, you might be able to find one for your specific distribution.

    Linux NFS-HOWTO

  5. #5
    Just Joined!
    Join Date
    Sep 2011
    Posts
    10
    Quote Originally Posted by yancek View Post
    Are you trying to use nfs to network two or more Linux machines?
    I'm trying to network two machines so I can easily swap files between them.
    Google brought me to a thread here which suggested NFS might be the way...

  6. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,110
    Are they both Linux machines? Check out the link I posted. You might try googling set up nfs on Ubuntu or whatever operating system you are using to get something more specific.

  7. #7
    Just Joined! fatra2's Avatar
    Join Date
    Mar 2005
    Location
    Switzerland
    Posts
    33
    Hi there,

    If you are just trying to "swap" files between the two machines, something like rsync might be the only process you need.

    NFS is called a file server for a reason. It is quite easy to setup, but made for Linux machines only. If you want to have a file server that is also accessible by MS, then you might want to look at SAMBA.

    Cheers

  8. #8
    Linux User
    Join Date
    Nov 2008
    Location
    Tokyo, Japan
    Posts
    260
    TL;DR: Just use "rsync" or "sftp" to copy files from one place to another. If you have Windows clients in the mix, you can install samba and use "smbclient". NFS is for servers, not really for simple file copying. "rsync" is the best, because it automatically figures out how to send directories across hosts, as well as individual files, and it does it with "SSH", so all you need is SSH access to a machine and "rsync" works perfectly. For example:
    Code:
    rsync ~/my-awesome-files/  192.168.0.100:/home/my-user/
    will copy your awesome files from your host machine to a networked host at 192.168.0.100, as long as you have permission to access the "/home/my-user" directory on that machine.

    If you really want to use NFS...
    NFS allows you to mount directories as though they were a seamless part of your own filesystem. Essentially, it lets you use the "mount" command on an IP address instead of a disk partition file in your "/dev" directory. Applications running on your computer will not be able to tell the difference between a networked host and an ordinary folder.

    Here's a quick overview of what you need to do to set it up:
    If you have two or more Linux machines that you don't plan to move around a lot, you can get them all talking by installing an NFS server on each of them. In debian, for example, that is as simple as "apt-get install nfs-kernel-server", which installs a kernel-level driver (as opposed to FUSE or user-space filesystem driver). Make sure all of your hosts have fixed IP addresses. Then edit your "/etc/exports" file, to indicate which directories you wish to share. Then edit your "/etc/fstab" file to indicate which hosts you would like to connect to at boot-time: mount every other NFS host that you want to share files with. You need to edit the "/etc/fstab" and "/etc/exports" files on every host machine.

    Say, for example, host "home-a" and "home-b" are both static IP addressed and defined in each others "/etc/hosts" file, and both have NFS servers installed on them. Lets also say both hosts have a directory "/net/home". The "/etc/fstab" file for "home-a" might contain the entry:
    Code:
    home-b:/home    /net/home    nfs  defaults  0  2
    And "home-b" has a similar "/etc/fstab" file mounting "home-a:/home". The "/etc/exports" file on both "home-a" and "home-b" will need to look something like this:
    Code:
    /home   (rw,sync,crossmnt,no_subtree_check)
    This tells NFS to share the "/home" directory with the world. File permissions will protect your files from unwanted access.

    Now, you can easily copy files between the hosts using just the ordinary "cp" command, or your favorite file system browser, Gnome-Nautilus, KDE-Dolphin, or Xfce-Thunar. Of course, your operating system will respect permissions of the other host's filesystem. But if you have a user on each machine, and you want to copy files from "home-a:/home/my-user/my-awesome-files" to "home-b:/home/my-user/my-awesome-files", then this command will work:
    Code:
    cp -a ~/my-awesome-files /net/home/my-user'.
    Of course, "rsync" can do that with just ordinary SSH networking, it doesn't need NFS or all the hassle of setting up NFS.

  9. #9
    Linux User
    Join Date
    Nov 2008
    Location
    Tokyo, Japan
    Posts
    260
    Pressing "submit reply", I got a blank page. I pressed the refresh button on my browser, then preseed "submit reply" again. The same reply was posted twice.
    Last edited by ramin.honary; 09-16-2011 at 06:38 AM. Reason: Deleted accidental duplicate post.

  10. #10
    Just Joined!
    Join Date
    Sep 2011
    Posts
    10
    Quote Originally Posted by yancek View Post
    Are they both Linux machines?
    Yes, both on Ubuntu.
    Check out the link I posted. You might try googling set up nfs on Ubuntu or whatever operating system you are using to get something more specific.
    Thank you, I have had a look, but haven't had time to digest it today...

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •