Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2016 12:37:19 -0700
From:      Mel Pilgrim <list_freebsd@bluerosetech.com>
To:        Amitabh Kant <amitabhkant@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: NFS or rsync for sharing files between FreeBSD servers?
Message-ID:  <9e68c578-7569-2015-db6b-92bea3864bc8@bluerosetech.com>
In-Reply-To: <CAPTAQBJD1qZ9kZSrXOOuKLHC6J_O3jBPiH4Yqav3qfQp8V7wtA@mail.gmail.com>
References:  <CAPTAQBJD1qZ9kZSrXOOuKLHC6J_O3jBPiH4Yqav3qfQp8V7wtA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2016-09-07 09:09, Amitabh Kant wrote:
> We need to share a number of directories between 3 servers running 9.3 .
> Most of these directories contain php/html/js/images files which do not
> change frequently.
>
> We need to keep the directories in sync on all three servers. Currently, we
> run a rsync command every time there is a change in one of the
> files/directories. Sometimes it does happen that we forget to run the rsync
> script making one of the servers return old versions.
>
> That is where we are planning to introduce a nfs_server on one of the
> servers, while the other two will be nfs_clients accessing the files
> through a shared directory. I understand that it would present a single
> point of failure, but in terms of disk access speed, will it make a huge
> difference further impacting the web servers running on the nfs_client
> servers ? The servers are connected to each other over gigabit lines, and
> the files are themselves not greater than 20-30 kb on an average, with some
> of  the larger image files somewhere around 4-5 MB.

Have a look at sysutils/inotify-tools.  IMO, inotifywait example 1 on 
the website[1] does what you're looking to do.

1: https://github.com/rvoicilas/inotify-tools/wiki#info



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9e68c578-7569-2015-db6b-92bea3864bc8>