From owner-freebsd-questions@FreeBSD.ORG Fri Oct 31 08:16:24 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655DB1065678 for ; Fri, 31 Oct 2008 08:16:24 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 37B708FC2E for ; Fri, 31 Oct 2008 08:16:23 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id F08E0AFCF5B; Fri, 31 Oct 2008 00:16:22 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Fri, 31 Oct 2008 09:08:05 +0100 User-Agent: KMail/1.9.7 References: <021f01c93a28$651752e0$2f45f8a0$@com.au> <200810301538.24819.fbsd.questions@rachie.is-a-geek.net> <03a101c93af6$e2f654d0$a8e2fe70$@com.au> In-Reply-To: <03a101c93af6$e2f654d0$a8e2fe70$@com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810310908.05306.fbsd.questions@rachie.is-a-geek.net> Cc: Brendan Hart Subject: Re: Large discrepancy in reported disk usage on USR partition X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 08:16:24 -0000 On Friday 31 October 2008 02:20:39 Brendan Hart wrote: > > Is it possible that nfs directory got written to /usr at some point in > > time? > > > You would only notice this with du if the nfs directory is unmounted. > > Unmount it and ls -al /usr/mountpoint should only give you an empty dir > > Bingo!! That is exactly the problem. An NFS mount was hiding a 17G local > dir which had an old copy of the entire NFS mounted dir. I guess it must > have been written incorrectly to this standby server by RSYNC before the > NFS mount was put in place. I will add an exclusion to rsync to make sure > it does not happen again even if the NFS dir is not mounted. I used to nfs mount /usr/ports and run a cron job on the local machine. I made a file on the local machine: echo 'This is a mountpoint' > /usr/ports/KEEP_ME_EMPTY The script would: if [ -e /usr/ports/KEEP_ME_EMPTY ]; then do_nfs_mount(); if [ -e /usr/ports/KEEP_ME_EMPTY ]; then give_up_or_wait(); fi fi Of course it's fragile, but it works for not so critical issues. -- Mel Problem with today's modular software: they start with the modules and never get to the software part.