Re: Strange diskspace loss

2010-05-04 Thread Ron

On May 3, 2010, at 11:02 PM, Anton Yuzhaninov wrote:

> On Tue, 4 May 2010 09:51:46 +0400, áÎÔÏÎ ëÌÅÓÓ wrote:
> áë> I'm running 7.2-RELEASE amd64. Uptime 24 days.
> áë> I was told that server stoped to send emails and started to look at. There
> áë> are strange things:
> áë> 
> áë> # df -h
> áë> FilesystemSizeUsed   Avail Capacity  Mounted on
> áë> /dev/aacdu0s1a7.7G582M6.6G 8%/
> áë> devfs 1.0K1.0K  0B   100%/dev
> áë> /dev/aacdu0s1d 31G276M 28G 1%/tmp
> áë> /dev/aacdu0s1f350G125G197G39%/usr
> áë> /dev/aacdu0s1e 31G 29G-25M   100%/var
> áë> /dev/aacdu1s1d450G3.0G411G 1%/var/db/mysql
> áë> fdescfs   1.0K1.0K  0B   100%/dev/fd
> áë> 
> áë> /var is out of space. Hmm.
> áë> 
> áë> # du -sh /var
> áë> 3,3G/var
> 
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DU-VS-DF

I had a simular issue due to files not being deleted until the process that has 
them open is stopped.  My apache logs filled up the logs directory, I deleted 
them but apache still had them open, so the space was not freed until I 
restarted apache.  Might this be your issue?


> -- 
> WBR,
> Anton Yuzhaninov
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Strange diskspace loss

2010-05-04 Thread Anton Yuzhaninov
On Tue, 4 May 2010 10:04:30 +0400, áÎÔÏÎ ëÌÅÓÓ wrote:
áë> And the fsck:
áë> 
áë> # fsck
áë> ** /dev/aacdu0s1a (NO
áë> WRITE)

Don't run fsck on mounted and used fs
It will show wrong info.

If you want to force fsck run reboot in single mode, and then run fsck.

-- 
WBR,
 Anton Yuzhaninov

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Strange diskspace loss

2010-05-04 Thread Antonio Kless
2010/5/4 

>  wrote:
>
> > And the fsck:
> >
> > # fsck
> ...
> > ** /dev/aacdu0s1e (NO WRITE)
> > ** Last Mounted on /var
> > ** Phase 1 - Check Blocks and Sizes
> > ** Phase 2 - Check Pathnames
> > ** Phase 3 - Check Connectivity
> > ** Phase 4 - Check Reference Counts
> > UNREF FILE I=23587  OWNER=root
> > MODE=100644
> > SIZE=0 MTIME=Apr  9 13:36
> > 2010
> > CLEAR?
> > no
> >
> > UNREF FILE I=3156011  OWNER=root MODE=100644
> > SIZE=6944766 MTIME=May  4 04:34 2010
> > CLEAR? no
> >
> > UNREF FILE I=3179521  OWNER=www MODE=100644
> > SIZE=30361665474 MTIME=May  4 09:43 2010
>  
> > CLEAR? no
>
> There's at least part of your problem:  30GB that du can't see
> because it isn't linked to by any directory entry.  Something
> associated with your web server has created a large scratch file,
> which it still has open (and thus the space can't be reclaimed),
> but it unlinked the file after creating it so that it would
> automatically go away once the process dies.
>
> This sort of thing -- though seldom so large as this -- is not at
> all uncommon in /tmp.  It's less common, but (as in this case) not
> unheard of, in /var/tmp.
>


So, in future, is there some sence to make /var, /var/log and /var/tmp on
different partitions? I usually use only two - /var and /var/db/mysql on
dedicated hard drive.


-- 
Best regards,
Antonio Kless,
http://kless.spb.ru/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Strange diskspace loss

2010-05-04 Thread perryh
 wrote:

> And the fsck:
>
> # fsck
...
> ** /dev/aacdu0s1e (NO WRITE)
> ** Last Mounted on /var
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> UNREF FILE I=23587  OWNER=root
> MODE=100644
> SIZE=0 MTIME=Apr  9 13:36
> 2010
> CLEAR?
> no
>
> UNREF FILE I=3156011  OWNER=root MODE=100644
> SIZE=6944766 MTIME=May  4 04:34 2010
> CLEAR? no
>
> UNREF FILE I=3179521  OWNER=www MODE=100644
> SIZE=30361665474 MTIME=May  4 09:43 2010
  
> CLEAR? no

There's at least part of your problem:  30GB that du can't see
because it isn't linked to by any directory entry.  Something
associated with your web server has created a large scratch file,
which it still has open (and thus the space can't be reclaimed),
but it unlinked the file after creating it so that it would
automatically go away once the process dies.

This sort of thing -- though seldom so large as this -- is not at
all uncommon in /tmp.  It's less common, but (as in this case) not
unheard of, in /var/tmp.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Strange diskspace loss

2010-05-03 Thread Peter Boosten
On 4-5-2010 8:11, Антон Клесс wrote:
> 
> And logs rotation is set up properly.

Try to find open files with fstat

Peter

-- 
http://www.boosten.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Strange diskspace loss

2010-05-03 Thread Антон Клесс
2010/5/4 Anton Yuzhaninov 

>
>
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DU-VS-DF
>
> --
> WBR,
>  Anton Yuzhaninov
>
>

There are no 25Gb files in /var:


# ls -lah /var
total 18930
drwxr-xr-x  25 rootwheel  512B May  4 13:55 .
drwxr-xr-x  21 rootwheel  512B Mar 11 18:20 ..
drwxrwxr-x   2 rootoperator   512B Oct 30  2009 .snap
drwxr-xr-x   2 rootwheel  512B May  1  2009 account
drwxr-xr-x   2 rootwheel  512B Nov  1  2009 agentx
drwxr-xr-x   4 rootwheel  512B May  1  2009 at
drwxr-x---   2 rootaudit  512B May  1  2009 audit
drwxr-x---   2 rootwheel  512B Apr 18 03:01 backups
drwxr-x---   2 rootwheel  512B Oct 30  2009 crash
drwxr-x---   3 rootwheel  512B May  1  2009 cron
drwxr-xr-x  13 rootwheel  512B Apr 13 09:54 db
dr-xr-xr-x   2 rootwheel  512B May  1  2009 empty
drwx--   2 rootwheel  512B May  1  2009 heimdal
drwxr-xr-x   3 rootwheel  512B Feb  9 19:03 lib
drwxrwxr-x   2 rootwheel  512B Nov  8 13:00 lock
drwxr-xr-x   4 rootwheel  2.0K May  4 10:00 log
-rw-r--r--   1 rootwheel   18M Apr  1 09:39 log.tar.gz
drwxrwxr-x   3 rootmail   512B Mar  3 13:06 mail
drwxr-xr-x   2 daemon  wheel  512B Oct 30  2009 msgs
drwxr-xr-x   5 rootwheel  512B Oct 30  2009 named
drwxr-xr-x   2 rootwheel  512B May  1  2009 preserve
drwxr-xr-x   9 rootwheel  1.0K May  4 09:56 run
drwxrwxr-x   2 rootdaemon 512B May  1  2009 rwho
drwxr-xr-x  11 rootwheel  512B Nov 16 19:42 spool
drwxrwxrwt   3 rootwheel  512B May  4 10:00 tmp
drwxr-xr-x   2 rootwheel  512B Oct 30  2009 yp


And logs rotation is set up properly.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: Strange diskspace loss

2010-05-03 Thread Антон Клесс
And the fsck:

# fsck
** /dev/aacdu0s1a (NO
WRITE)
** Last Mounted on
/
** Root file
system
** Phase 1 - Check Blocks and
Sizes
** Phase 2 - Check
Pathnames
** Phase 3 - Check
Connectivity
** Phase 4 - Check Reference
Counts
** Phase 5 - Check Cyl
groups
4556 files, 298178 used, 3762885 free (981 frags, 470238 blocks, 0.0%
fragmentation)
** /dev/aacdu0s1d (NO
WRITE)
** Last Mounted on
/tmp
** Phase 1 - Check Blocks and
Sizes
** Phase 2 - Check
Pathnames
** Phase 3 - Check
Connectivity
** Phase 4 - Check Reference
Counts
UNREF FILE I=9  OWNER=mysql
MODE=100600
SIZE=0 MTIME=Apr 23 12:17
2010
CLEAR?
no


UNREF FILE I=10  OWNER=mysql MODE=100600
SIZE=0 MTIME=Apr 23 12:17 2010
CLEAR? no

UNREF FILE I=11  OWNER=mysql MODE=100600
SIZE=0 MTIME=Apr 23 12:17 2010
CLEAR? no

UNREF FILE I=12  OWNER=mysql MODE=100600
SIZE=0 MTIME=Apr 23 12:17 2010
CLEAR? no

UNREF FILE I=13  OWNER=mysql MODE=100600
SIZE=0 MTIME=Apr 23 12:17 2010
CLEAR? no

UNREF FILE I=1860614  OWNER=root MODE=100600
SIZE=40632320 MTIME=May  4 09:39 2010
CLEAR? no

** Phase 5 - Check Cyl groups
2823 files, 141394 used, 16105940 free (100 frags, 2013230 blocks, 0.0%
fragmentation)
** /dev/aacdu0s1f (NO
WRITE)
** Last Mounted on
/usr
** Phase 1 - Check Blocks and
Sizes
** Phase 2 - Check
Pathnames
** Phase 3 - Check
Connectivity
** Phase 4 - Check Reference
Counts
** Phase 5 - Check Cyl
groups
SUMMARY INFORMATION
BAD
SALVAGE?
no


BLK(S) MISSING IN BIT MAPS
SALVAGE? no

265180 files, 65441856 used, 117860015 free (49031 frags, 14726373 blocks,
0.0% fragmentation)
** /dev/aacdu0s1e (NO
WRITE)
** Last Mounted on
/var
** Phase 1 - Check Blocks and
Sizes
** Phase 2 - Check
Pathnames
** Phase 3 - Check
Connectivity
** Phase 4 - Check Reference
Counts
UNREF FILE I=23587  OWNER=root
MODE=100644
SIZE=0 MTIME=Apr  9 13:36
2010
CLEAR?
no


UNREF FILE I=3156011  OWNER=root MODE=100644
SIZE=6944766 MTIME=May  4 04:34 2010
CLEAR? no

UNREF FILE I=3179521  OWNER=www MODE=100644
SIZE=30361665474 MTIME=May  4 09:43 2010
CLEAR? no

** Phase 5 - Check Cyl groups
24527 files, 14958948 used, 1288386 free (15202 frags, 159148 blocks, 0.1%
fragmentation)
** /dev/aacdu1s1d (NO
WRITE)
** Last Mounted on
/var/db/mysql
** Phase 1 - Check Blocks and
Sizes
** Phase 2 - Check
Pathnames
** Phase 3 - Check
Connectivity
** Phase 4 - Check Reference
Counts
** Phase 5 - Check Cyl
groups
278 files, 1597189 used, 234516789 free (525 frags, 29314533 blocks, 0.0%
fragmentation)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Strange diskspace loss

2010-05-03 Thread Anton Yuzhaninov
On Tue, 4 May 2010 09:51:46 +0400, áÎÔÏÎ ëÌÅÓÓ wrote:
áë> I'm running 7.2-RELEASE amd64. Uptime 24 days.
áë> I was told that server stoped to send emails and started to look at. There
áë> are strange things:
áë> 
áë> # df -h
áë> FilesystemSizeUsed   Avail Capacity  Mounted on
áë> /dev/aacdu0s1a7.7G582M6.6G 8%/
áë> devfs 1.0K1.0K  0B   100%/dev
áë> /dev/aacdu0s1d 31G276M 28G 1%/tmp
áë> /dev/aacdu0s1f350G125G197G39%/usr
áë> /dev/aacdu0s1e 31G 29G-25M   100%/var
áë> /dev/aacdu1s1d450G3.0G411G 1%/var/db/mysql
áë> fdescfs   1.0K1.0K  0B   100%/dev/fd
áë> 
áë> /var is out of space. Hmm.
áë> 
áë> # du -sh /var
áë> 3,3G/var

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DU-VS-DF

-- 
WBR,
 Anton Yuzhaninov

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Strange diskspace loss

2010-05-03 Thread Антон Клесс
Hello.

I'm running 7.2-RELEASE amd64. Uptime 24 days.
I was told that server stoped to send emails and started to look at. There
are strange things:

# df -h
FilesystemSizeUsed   Avail Capacity  Mounted on
/dev/aacdu0s1a7.7G582M6.6G 8%/
devfs 1.0K1.0K  0B   100%/dev
/dev/aacdu0s1d 31G276M 28G 1%/tmp
/dev/aacdu0s1f350G125G197G39%/usr
/dev/aacdu0s1e 31G 29G-25M   100%/var
/dev/aacdu1s1d450G3.0G411G 1%/var/db/mysql
fdescfs   1.0K1.0K  0B   100%/dev/fd

/var is out of space. Hmm.

# du -sh /var
3,3G/var

How can it be so? o_O
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"