Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 2009 12:19:25 -0400
From:      Steve Bertrand <steve@ibctech.ca>
To:        Luke Dean <LukeD@pobox.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to recover disk space after "filesystem full"
Message-ID:  <4A16D08D.1000900@ibctech.ca>
In-Reply-To: <alpine.BSF.2.00.0905220853530.55458@border.lukas.is-a-geek.org>
References:  <alpine.BSF.2.00.0905220853530.55458@border.lukas.is-a-geek.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Luke Dean wrote:
> 
> Yes, it sounds like a stupid question, but let me tell the story.
> 
> The log for my dhcp server filled up /var last night, which meant that
> dhcpd was also unable to hand out new leases, which meant that I had
> effectively been DOSed.  I'll have to look into changing my logging
> policies.
> 
> So, to correct the problem, I log into the router, removed the big
> log and several other files in /var to free up some space, and assumed
> this would correct the problem.
> 
> It did not.
> Several minutes after freeing up a lot of space on /var, I continued
> to get "filesystem full" messages and "df" continued to show the
> capacity at >100%.  I checked "df -i" for the inodes too.  That was
> fine.  I ran a quick fsck to see if that might shock the system into
> seeing all the space that I'd freed up, but no good.
> 
> I ended up rebooting the box.
> 
> Was there any other possible solution I could've tried?

You have to restart the service that was holding the log file(s) open.
The system does not release the space while an application is 'using'
the file, even after it's been deleted.

> Why wouldn't the free space immediately appear as free?

Because technically, the space is not freed. "lsof" will help identify
which process(es) are holding a particular file open, if you see that
disk space is not recovered as expected after deletion:

# pkg_add -r lsof

pearl# lsof | grep auth.log

syslogd     850     root   15w    VREG      0,127      75199  237484
/var/log/auth.log

Steve

[-- Attachment #2 --]
0	*H
010	+0	*H
00CK9AbxIUw0
	*H
0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA0
090507231610Z
100507231610Z0B10UThawte Freemail Member10	*H
	steve@ibctech.ca0"0
	*H
0
DZ杙<2IⵀfrsE6q?0.>
S@Œ!V?A\Q
r-aZ
Ōf/0{OYQhɏߴ
F_\Q0BF=<_.a*3epeY|tݼcvlҷ+@piQA{2E9WN4[Z`h6VM/zPbd(GC^K6XV4j<t-0+0U0steve@ibctech.ca0U00
	*H
æ|85aQz-*3HG		.s*Fw*`HvFw;9ytƘn0taC/:WC+LÙ{Oq 1n00CK9AbxIUw0
	*H
0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA0
090507231610Z
100507231610Z0B10UThawte Freemail Member10	*H
	steve@ibctech.ca0"0
	*H
0
DZ杙<2IⵀfrsE6q?0.>
S@Œ!V?A\Q
r-aZ
Ōf/0{OYQhɏߴ
F_\Q0BF=<_.a*3epeY|tݼcvlҷ+@piQA{2E9WN4[Z`h6VM/zPbd(GC^K6XV4j<t-0+0U0steve@ibctech.ca0U00
	*H
æ|85aQz-*3HG		.s*Fw*`HvFw;9ytƘn0taC/:WC+LÙ{Oq 1n0?0
0
	*H
010	UZA10UWestern Cape10U	Cape Town10U
Thawte Consulting1(0&UCertification Services Division1$0"UThawte Personal Freemail CA1+0)	*H
	personal-freemail@thawte.com0
030717000000Z
130716235959Z0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA00
	*H
0Ħ<UsUNʙZhup[v:aQP
0cZ,p+Z?qV˯<6$*+w=+>@dקe*TH<a@dr`00U00CU<0:08642http://crl.thawte.com/ThawtePersonalFreemailCA.crl0U0)U"0 010UPrivateLabel2-1380
	*H
HP.
fgCL!6-6/P p<ab:~t%Pb'qW%ݩ9 Oe_N4[5MwV!x!5$F]_eO1d0`0v0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CAK9AbxIUw0	+0	*H
	1	*H
0	*H
	1
090522161925Z0#	*H
	1W2ʻw2ndD0R	*H
	1E0C0
*H
0*H
0
*H
@0+0
*H
(0	+71x0v0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CAK9AbxIUw0*H
	1xv0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CAK9AbxIUw0
	*H
Ghg}X~h(}F@Kb.`n4jɗt7ѐ{elfym{^Vn'ܫ}-}3I|N.^<A=XG2m ˛wbɥaCgGTlVLr^;@X:-dhjk7i˼N$x6j+ԕ=1%=(!f}!j4As-nx6n25
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A16D08D.1000900>