-   Linux - Newbie (
-   -   NFS Home directories for laptops (

IndustrialGeek 05-17-2004 10:51 PM

NFS Home directories for laptops
Hi All,
This is my first post, so go easy! =)
My problem is this: I have several desktops and a laptop that I would like to use NFS home dirs on. If I create/edit files remotely, is there an easy way to "sync" the work I've done with the NFS server automatically next time I log into the network? Is that what the (rw, sync) in the /etc/exports file does for you? Probably a very simple question, but I was afraid I might loose/corrupt my work if I experimented too much! Thanks in advance!


ac1980 05-20-2004 10:27 AM

Actually you have a problem: if you have home on NFS, then when you're not connected you won't be able to mount /home, and that's not good.
If you need to use the laptop offline AND the desktops without the laptop, you have 2 choices:
1. use a distributed filesystem like coda or afs. Keep in mind this is not so easy to setup for a novice
2. export the desktops' /home, but keep a local copy on the laptop as well. Then when you connect the laptop, mount //desk/home as /mnt/home and have a cron script run:

rsync -ua /home /mnt/home
rsync -ua /mnt/home /home

You may need to install the rsync package, then see rsync manpage.

PS: the (sync) in the /etc/exports means that writing is syncronous, i.e. the server won't return an ok code until it has finished writing to disk. In async mode (most used on slow peripherals like printers) the process returns ok after having stored the data in a buffer, so the client doesn't need to wait.

All times are GMT -5. The time now is 09:04 PM.