From owner-freebsd-questions@FreeBSD.ORG Tue Jul 6 02:11:51 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CCF916A4CE for ; Tue, 6 Jul 2004 02:11:51 +0000 (GMT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8213A43D45 for ; Tue, 6 Jul 2004 02:11:50 +0000 (GMT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 5AF8B2BD43 for ; Tue, 6 Jul 2004 12:11:47 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id ACF6B5130C; Tue, 6 Jul 2004 11:41:44 +0930 (CST) Date: Tue, 6 Jul 2004 11:41:44 +0930 From: Greg 'groggy' Lehey To: Richard Bradley Message-ID: <20040706021144.GB1069@wantadilla.lemis.com> References: <200407060229.03972.rtb27@cam.ac.uk> <20040706013649.GN6574@dan.emsphone.com> <200407060259.08128.rtb27@cam.ac.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XOIedfhf+7KOe/yw" Content-Disposition: inline In-Reply-To: <200407060259.08128.rtb27@cam.ac.uk> User-Agent: Mutt/1.4.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: Dan Nelson cc: freebsd-questions@freebsd.org Subject: Re: /rescue is huge!! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 02:11:51 -0000 --XOIedfhf+7KOe/yw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tuesday, 6 July 2004 at 2:59:08 +0100, Richard Bradley wrote: > On Tuesday 06 July 2004 2:36 am, you wrote: >> In the last episode (Jul 06), Richard Bradley said: >>> I recently tried to add a user to my FreeBSD box, but was amazed to >>> find that the / partition was full! I had a look, and the culprit is >>> the "/rescue" folder, holding 135 statically linked binaries of >>> nearly 4Mb each, giving a folder size of 491Mb! >> >> Check the inode number of each file in /rescue (ls -li /rescue). >> You'll notice they're all the same, which means they're all hardlinks >> to the same file. "du /rescue" should report under 4MB. >> >> Your space is probably being taken up somewhere else. > > That's very strange if true, because since deleting the "/rescue" > folder, I'm a little irritated by the use of the term "folder". Do you mean mail? /rescue is a directory. > the used space on / has gone from 550Mb+ to 129Mb. How do you measure this? If you created a 100 MB partition or thereabouts, you can't store 550 MB in it. > I can't check the inodes now, as I have `rm`ed them all! The thing to do next time is: # ls -il /rescue total 460 664332 -r-xr-xr-x 135 root wheel 3554248 May 8 12:43 [ 664332 -r-xr-xr-x 135 root wheel 3554248 May 8 12:43 atacontrol 664332 -r-xr-xr-x 135 root wheel 3554248 May 8 12:43 atm 664332 -r-xr-xr-x 135 root wheel 3554248 May 8 12:43 atmconfig The first column in this list is the inode number; the third is the number of links. Looking at the size, we see: # du -sk /rescue 3502 /rescue 100 MB should be plenty of space for the root file system assuming that you have separate /usr and /var file systems (not something that I recommend, but that's what the handbook recommends). I'd guess that you've made some mistake somewhere and have been confused by the concept of links. Briefly, UNIX files consist of an metadata (which describes the file) and the data of the file itself. The metadata does *not* include the name; it's accessed by number. The name is stored in the directory, which is like a phone book: it contains a name and a number, in this case file name and inode number. Like a phone book, more than one name can have the same number. That's what you're seeing here; the link count just states how many names refer to this inode. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html Note: I discard all HTML mail unseen. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. --XOIedfhf+7KOe/yw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFA6gpgIubykFB6QiMRAjWxAKCnYGkuRZ3xWbPSIOOxwo5Es907wACfd2SI zqcveqHhQUxMrM4Vcy7IsD4= =kZ7G -----END PGP SIGNATURE----- --XOIedfhf+7KOe/yw--