From owner-freebsd-questions@FreeBSD.ORG Thu Nov 3 21:33:41 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 B13FE16A41F for ; Thu, 3 Nov 2005 21:33:41 +0000 (GMT) (envelope-from ecrist@secure-computing.net) Received: from grog.secure-computing.net (grog.secure-computing.net [216.243.161.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07ED643D48 for ; Thu, 3 Nov 2005 21:33:40 +0000 (GMT) (envelope-from ecrist@secure-computing.net) Received: from [192.168.1.102] (snipe.secure-computing.net [216.243.161.77]) (authenticated bits=0) by grog.secure-computing.net (8.13.1/8.13.1) with ESMTP id jA3LXnEq083661 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT); Thu, 3 Nov 2005 15:33:49 -0600 (CST) (envelope-from ecrist@secure-computing.net) DomainKey-Signature: a=rsa-sha1; s=grog; d=secure-computing.net; c=nofws; q=dns; h=in-reply-to:references:mime-version:content-type:message-id:cc: content-transfer-encoding:from:subject:date:to:x-mailer:x-spam-status:x-spam-checker-version; b=KqCbOHu4rpX06kY2Hac3fxFntH/66O83DOt8kMiWmCz8TFpxqsI5jBG2Lk/c5N0+z SxRbRm7fmpK1/+/temrsQ== In-Reply-To: <436A09E9.5070905@axis.nl> References: <436A09E9.5070905@axis.nl> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <6CD8B2FF-1CA2-4F98-979B-E4947519A00D@secure-computing.net> Content-Transfer-Encoding: 7bit From: Eric F Crist Date: Thu, 3 Nov 2005 15:33:11 -0600 To: Olaf Greve X-Mailer: Apple Mail (2.746.2) X-Spam-Status: No, score=-4.4 required=4.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on grog.secure-computing.net Cc: freebsd-questions@freebsd.org Subject: Re: How to clear an improperly unreferenced file in multi-user mode? 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: Thu, 03 Nov 2005 21:33:41 -0000 On Nov 3, 2005, at 7:00 AM, Olaf Greve wrote: > Hi, > > When doing some maintenance on my fall-back server I ran into > something weird. When running df it turned out /var was for 90% > full. I then manually deleted some files (as root over SSH), > amongst which the 'maillog' logfiles in /var/log, I also killed > sendmail (as it was generating the big log files, and at present I > don't need to run it on that machine), and just to be sure I > created a new 'maillog file of 0 length. > > So far so good, but after removing the maillog files and performing > another df call, the available size had not quite dropped as much > as expected and as should. DU reports the proper amount of disk > usage, so I performed an fsck. > ... > Now, of course one way to get rid of that big sucker is to boot the > machine in single user mode and run fsck again, however, the box is > nowhere near me and I cannot go down to the city where the machine > is anytime soon (besides: this is far from an urgent issue). So, I > was wondering about a thing: rather than doing a remote reboot and > hope that fsck will clear it up in the booting process (if it does > that at all, that is), I was wondering if there's a way to fix this > when running in multi user mode. > > Does anyone know how (if possible) to achieve this, or do I have to > reboot the machine in single user mode after all? I think that if you run a du -hd2 / you'll see that there's probably a bunch of crap in /var/ftp. I found this when I mistakenly enabled anonymous FTP. There were a much of random-sized binaries killing my hard drive. ----- Eric F Crist Secure Computing Networks http://www.secure-computing.net