From owner-freebsd-questions Fri Dec 14 10:36:31 2001 Delivered-To: freebsd-questions@freebsd.org Received: from catalyst.sasknow.net (catalyst.sasknow.net [207.195.92.130]) by hub.freebsd.org (Postfix) with ESMTP id 7E42037B416 for ; Fri, 14 Dec 2001 10:36:20 -0800 (PST) Received: from localhost (ryan@localhost) by catalyst.sasknow.net (8.11.6/8.11.6) with ESMTP id fBEIcH296886; Fri, 14 Dec 2001 12:38:17 -0600 (CST) (envelope-from ryan@sasknow.com) X-Authentication-Warning: catalyst.sasknow.net: ryan owned process doing -bs Date: Fri, 14 Dec 2001 12:38:17 -0600 (CST) From: Ryan Thompson X-X-Sender: To: Sam Suh Cc: Subject: Re: Disk space shrink? In-Reply-To: <3C1A41A0.1A54C229@bigstudios.com> Message-ID: <20011214122200.N94620-100000@catalyst.sasknow.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Sam Suh wrote to Ryan Thompson: > Ryan Thompson wrote: > > [...] > > Also, you are probably wasting a significant amount of space with free > > inodes. On a filesystem of this size, you will have, by default, WAY > > more inodes than you need. (inode density, by default, is one inode > > per 4K..) Check the output of df -i to see how many inodes you have > > [...] > > > > - Ryan > > Hi, Ryan. Thanks for the very insightful information. You are > right. df -i did reveal something I didn't want to see. 4835994 > free inodes with nothing in the disk! Yep! That sounds about right. > As you said, I would like to free up the spaces. If it is not too > much of problem, could you recommend what inode size should be? It really depends on what you plan to store on the filesystem. This is really a question of the average file size on the file system. On the /var/ partition of my mailserver, the average file size is around 10KB. (To calculate this, just take the "used" column from df and divide by the "iused" column. On a general user/staff storage filesystem (home directories, more or less), the average file size here is about 150KB. If you have a special purpose in mind, your actual numbers might go outside of these bounds. A good rule of thumb I use is, if I already have a good idea what the density is going to be (i.e., I am adding or upgrading a system of the same type), I'll set the bytes per inode to about half of the expected value. If my observations were valid, then it is very unlikely that I'd run out of inodes. I always try and find some representative sample data. If I don't have a clue, I'll be much more conservative with bytes per inode... As it is better to have too many than too few. I have never seen a filesystem (even very large ones) with 4.5 million files, though... ;-) 16K ( -i 16384) or 32K (-i 32768), or even higher, are usually safe for many filesystems, but, again, your mileage may vary. - Ryan > I am sorry for such a newbie question but I hate to say I didn't > had to meddle with newfs, beside letting fbsd to do the job ( I > mean fbsd default all the time ). > -- Ryan Thompson Network Administrator, Accounts SaskNow Technologies - http://www.sasknow.com #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2 Tel: 306-664-3600 Fax: 306-664-1161 Saskatoon Toll-Free: 877-727-5669 (877-SASKNOW) North America To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message