LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   New to NFS, looking for advice (https://www.linuxquestions.org/questions/linux-newbie-8/new-to-nfs-looking-for-advice-307867/)

Seventh 03-30-2005 01:05 PM

New to NFS, looking for advice
 
Hi all,

I'm migrating an old server to a new one, and need to copy the contents of /home on the old server to the new one.

I'd like to use NFS to mount /home on the old server at /mnt/migration on the new one, but am not really sure how to go about this.

Any advice would be really appreciated. :) Both boxes are Redhat 9 Enterprise.

tangle 03-30-2005 01:45 PM

On the old server you need to put this in the /etc/exports :
/home <ip address of the new server>(rw,no root squash)

This will allow the new server (only the new server) to mount the share as read/write.

On the server that you want to mount the share put this in your /etc/fstab:
<old server name>:/home /mnt/migration nfs rw 0 0

This will mount the share at boot. If you want to mount it without restarting, run this command:
mount /mnt/migration
or
mount -a

tangle 03-30-2005 01:45 PM

Forgot, you need to do this as root.

hob 03-30-2005 01:50 PM

NFS is easy, the catch is that both the client and server systems need to share the same set of user accounts (using NIS or LDAP).

On the server you need to edit /etc/exports:

/home 127.0.0.1(ro,no_root_squash) <client-ip>(ro,no_root_squash)

No spaces between the IP addresses and the (.

On the client, /etc/fstab will need an extra line:

nfs-server:/home /mnt/migration nfs defaults 0 0


All times are GMT -5. The time now is 06:43 PM.