You are not logged in.

#1 2010-11-05 12:38:20

Durga
Member
Registered: 2010-04-23
Posts: 5

NFS: machine serves as server and client

My home setup consits of one working machine, one server and one laptop.
One my working machine I mount the server disks with NFS what works perfectly.
Now I would like to mount the working directory of the working machine on my laptop. This means my working machine is server and client at the same time.
What is confusing me is the 'STATD_OPTS' line in /etc/conf.d/nfs-common.conf.
The NFS Arch wiki says that for a server is should be  'STATD_OPTS=--no-notify' and for clients  'STATD_OPTS=""'. Furthermore it's written: "Do not use the --no-notify option on the client side, unless you are fully aware of the consequences of doing so."
Actually I am not so sure about the consequences....
What settings would you recommend?
Thanks for your help!

Offline

#2 2010-11-05 23:19:01

Noble
Member
Registered: 2010-06-01
Posts: 63

Re: NFS: machine serves as server and client

Why not just keep everything on the server?


Those who give up their liberty for security,
neither deserve liberty nor freedom,
and they will lose both.
- Benjamin Franklin

Offline

#3 2010-11-11 00:12:30

Durga
Member
Registered: 2010-04-23
Posts: 5

Re: NFS: machine serves as server and client

Hey, sorry for the late reply!

The idea is to frequently sync my Laptop with my working directory on my desktop PC. Thats why I want to mount it with nfs. Due to capacity problems the laptop only holds the tree structure the working directory on my desktop PC except a few files currently needed (Anywhere I can download them from the server).
Every Sunday a  scheduled rsync -vaP --delete (the files deleted on the working dir will also be deleted on the server) of the very well-maintained working dir on my desktop PC to the server takes place.

Unfortunately I cannot make a rsync -vaP --delete from my laptop directly to my server because most trees in my laptop are empty, so the files will be deleted on the server. If I make rsync -vaP (without --delete) the new folders I made on the laptop will be copied to the server but again they will be wiped out after the next scheduled rsync from the desktop computer.

Hmm, I hope I expressed myself in an understandable way...

However, I can also mount the working dir on my laptop with ssh, so the desktop PC doesn't need to be a NFS server. I was just wondering....

Offline

#4 2010-11-11 00:52:47

dunz0r
Member
From: Sweden
Registered: 2009-03-30
Posts: 258
Website

Re: NFS: machine serves as server and client

All my machines at home share files with each other, I don't think I've ever touched the "config" for NFS.


RTFM or GTFO
hax0r.se

Offline

#5 2010-11-11 07:56:52

ploub
Member
Registered: 2007-05-16
Posts: 132

Re: NFS: machine serves as server and client

A simpler way is to use unison.
Start a unison server on your desktop (I put this in autostarted applications):

unison -socket xxxx

(xxxx=your choice of port number)
Set up a unison profile on your laptop for the tree you want to sync, using the socket option.
Now when you sync with unison from your laptop you can choose which direction to sync, and you can skip files or folders that you don't want to sync or delete.

Offline

#6 2010-11-14 15:49:28

Durga
Member
Registered: 2010-04-23
Posts: 5

Re: NFS: machine serves as server and client

yes you are right dunz0r. I can mount all shared folders no matter on what machine. So I better forget that 'STATD_OPTS' line in /etc/conf.d/nfs-common.conf!

unison is also a nice option but I am quite happy with NFS & rsync.

Thanks for your hints!

Offline

Board footer

Powered by FluxBB