From owner-freebsd-questions@freebsd.org Thu Sep 8 19:37:24 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43B97BD150A for ; Thu, 8 Sep 2016 19:37:24 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from echo.brtsvcs.net (echo.brtsvcs.net [IPv6:2607:f740:c::4ae]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 256BF3AF for ; Thu, 8 Sep 2016 19:37:23 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from chombo.houseloki.net (c-73-240-250-185.hsd1.or.comcast.net [73.240.250.185]) by echo.brtsvcs.net (Postfix) with ESMTPS id 8DCEC50006; Thu, 8 Sep 2016 19:37:17 +0000 (UTC) Received: from [IPv6:fe80::7102:4df8:1f13:5c55] (unknown [IPv6:fe80::7102:4df8:1f13:5c55]) by chombo.houseloki.net (Postfix) with ESMTPSA id 46CF41844; Thu, 8 Sep 2016 12:37:16 -0700 (PDT) Subject: Re: NFS or rsync for sharing files between FreeBSD servers? To: Amitabh Kant References: From: Mel Pilgrim Cc: freebsd-questions@freebsd.org Reply-To: freebsd-questions@freebsd.org Message-ID: <9e68c578-7569-2015-db6b-92bea3864bc8@bluerosetech.com> Date: Thu, 8 Sep 2016 12:37:19 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 19:37:24 -0000 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