From owner-freebsd-questions@FreeBSD.ORG Wed Mar 12 19:18:30 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 86741106566C for ; Wed, 12 Mar 2008 19:18:30 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id 5BC888FC2C for ; Wed, 12 Mar 2008 19:18:30 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 4EE3B5CF3; Wed, 12 Mar 2008 15:02:01 -0400 (EDT) X-Virus-Scanned: amavisd-new at codefab.com Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PZ0KehI0sp2u; Wed, 12 Mar 2008 15:01:58 -0400 (EDT) Received: from cswiger1.apple.com (unknown [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTPSA id 0EB965C6E; Wed, 12 Mar 2008 15:01:57 -0400 (EDT) Message-Id: <828E6D60-C685-49AA-B0B4-FAD46D6A9DD3@mac.com> From: Chuck Swiger To: Angelo Turetta In-Reply-To: <47D82486.5060402@bestunion.it> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Wed, 12 Mar 2008 12:01:56 -0700 References: <47D82486.5060402@bestunion.it> X-Mailer: Apple Mail (2.919.2) Cc: freebsd-questions@freebsd.org Subject: Re: UFS2 optimization for many small files 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: Wed, 12 Mar 2008 19:18:30 -0000 On Mar 12, 2008, at 11:44 AM, Angelo Turetta wrote: > I then proceeded to copy my cyrus-imapd partition from /usr/local/ > mail (on /dev/da0s1f) to the new 76GB /mail (/dev/da2s1d). During > this copy I noticed the disk usage of the mailboxes (as reported by > du(8)) growing about 20% larger in the process. Please note that > cyrus stores mailboxes with 1 file per message, 1 directory per IMAP- > folder, and the moved files are in the order of the hundred- > thousands, with half of them less than 8 KB large. > > I tried understanding where the difference was, but I cannot work- > out any cause in the file systems: I believe Cyrus will create hard links if the same email message is kept in multiple folders. If your copy did not preserve hard and symlinks, the extra space growth might be a result...consider retrying the copy using the options to rsync/tar/whatever to preserve the links. Regards, -- -Chuck