Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Oct 2008 09:08:05 +0100
From:      Mel <fbsd.questions@rachie.is-a-geek.net>
To:        freebsd-questions@freebsd.org
Cc:        Brendan Hart <brendanh@strategicecommerce.com.au>
Subject:   Re: Large discrepancy in reported disk usage on USR partition
Message-ID:  <200810310908.05306.fbsd.questions@rachie.is-a-geek.net>
In-Reply-To: <03a101c93af6$e2f654d0$a8e2fe70$@com.au>
References:  <021f01c93a28$651752e0$2f45f8a0$@com.au> <200810301538.24819.fbsd.questions@rachie.is-a-geek.net> <03a101c93af6$e2f654d0$a8e2fe70$@com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810310908.05306.fbsd.questions>