From owner-freebsd-fs@FreeBSD.ORG Wed Nov 15 20:53:46 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CB8916A47C for ; Wed, 15 Nov 2006 20:53:46 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9050C43DCD for ; Wed, 15 Nov 2006 20:53:14 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id kAFKr6ip090645; Wed, 15 Nov 2006 14:53:07 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <455B7E37.9000003@centtech.com> Date: Wed, 15 Nov 2006 14:53:11 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.7 (X11/20061015) MIME-Version: 1.0 To: Ensel Sharon References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2196/Wed Nov 15 08:16:17 2006 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: freebsd-fs@freebsd.org Subject: Re: quota command and rsync snapshots... X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 20:53:46 -0000 On 11/15/06 14:39, Ensel Sharon wrote: > I am currently afraid of UFS2 snapshots (maybe that's rational and maybe > it's not ...) and so I am using Mike Rubel style rsync snapshots: > > rm -rf day.3 > mv day.2 day.3 > mv day.1 day.2 > cp -al day.0 day.1 > rsync /source /destination/day.0 > > (note, GNU cp, the -al means copy everything with hard links) > > You get the idea. > > The question is, when I do a `du -ak` of each of the four days (day.0 - > day.3) I get roughly the same number for all of them, which is to be > expected. > > However the output of `quota` for that user shows a _much_ larger number > than the `du` for each of those directories. > > I would think that `quota` would show me the sum of day.0 plus (all the > total differences of day.1 - day.3) but it shows me a number _much_ larger > than that. I really can't even guess what the number it is showing me is. > > So I have two questions: given a directory that contains one current > backup and three snapshots (day.0 - day.4) what command can I run that > will show me the total _actual_ space used ? du will not work because it > counts up each directory as if it used all of that space... Sure it does - you just need to specify either all the directories on the command line, or the top level of the directories. It won't count hard links (assuming that is what you are talking about with the Mike Rubel comment) twice. > Second, is there any way to get quota to show an accurate representation > of the users usage ? It should be accurate - can you send some sample output? Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------