Re: [gentoo-user] Re: df and du difference

2008-08-18 Thread kashani

Platoali wrote:

 /dev/console (deleted)
mysqld 5679mysql5u  REG8,1  01009860 
/tmp/iby8kN8L (deleted)
mysqld 5679mysql6u  REG8,1  01009861 
/tmp/ib3OyWjn (deleted)
mysqld 5679mysql7u  REG8,1  01009862 
/tmp/ibCqa6uY (deleted)
mysqld 5679mysql8u  REG8,1  01009863 
/tmp/ibnDCmHz (deleted)
mysqld 5679mysql   12u  REG8,1  01009864 
/tmp/ibaQcs5a (deleted)

...


Nothing so big. just about 20 lines and the biggest ones are these.

This server hosts accounting software for an ISP:  just a couple  python 
scripts, apache with PHP and a small Postgresql database.


	You're going to have to rebuild this server because someone is 
eventually going to break it.


The number one rule of shared database servers is never put /tmp inside 
/ because eventually some idiot will kick off some poorly thought out 
job to crunch some numbers and he will fill /tmp and therefore / and 
break your server. /tmp should always be it's own partition in this type 
of environment. I have also found 5GB to be a good size as well since 
most crazy jobs would die around 4GB on 32 bit systems.


kashani



[gentoo-user] Re: df and du difference

2008-08-17 Thread Platoali
 Alan McKinnon wrote:
 On Sunday 17 August 2008 01:18:21 Paul Colquhoun wrote:
  Actually, there is one more way to hide a file from du
 
  If there is a file in the /var directory *BEFORE* the

 /var partition is

  mounted onto the directory, then du won't find it, but

 df will know

  about the space it is using.
 
  You will probably need to boot from a live CD of some

 sort to be able to

  umount the partitions and check the underlying

 directory, but it might

  be worth it there is still space unaccounted for after a

 reboot.

 There's a much easier way. As root:

 mount -o bind / /path/to/some/arb/dir

 see man mount


Thank you very much. That was the problem. some files have been hidden in 
/mnt/backup.

I deleted them and problem is solved.

Thanks again
Platoali




[gentoo-user] Re: df and du difference

2008-08-16 Thread platoali
 Sebastian Günther wrote:
 df shows you the available space on the fs and du the size of the files
 inside it.

 The difference is caused by the journal and the 5% reserved for the
 superuser, which du does not take in account

  Do others have this kind of inconsistancy on their systems?

 I would think everyone, who does not have changed the default settings
 from mkfs.ext3.

I've another question. On my server root is 80% full and last weed it was 98% 
full. if it get to 100% , How can I delete or flush Journals to free some 
space?

best wishes
Platoali 



Re: [gentoo-user] Re: df and du difference

2008-08-16 Thread Sebastian Günther
* [EMAIL PROTECTED] ([EMAIL PROTECTED]) [16.08.08 10:08]:
 
 I've another question. On my server root is 80% full and last weed it was 98% 
 full. if it get to 100% , How can I delete or flush Journals to free some 
 space?
 
That is what the 5% are for, as you saw there where stated as not 
available but they are for the superuser for such things.

BTW: Why is your root so full, or didn't you partionate your disk?

 best wishes
 Platoali 
 

HTH
Sebastian

-- 
  Religion ist das Opium des Volkes.   Karl Marx

 [EMAIL PROTECTED]@N GÜNTHER mailto:[EMAIL PROTECTED]


pgpqwDZGH2Mnm.pgp
Description: PGP signature


Re: [gentoo-user] Re: df and du difference

2008-08-16 Thread Dale

[EMAIL PROTECTED] wrote:

 Sebastian Günther wrote:
  

df shows you the available space on the fs and du the size of the files
inside it.

The difference is caused by the journal and the 5% reserved for the
superuser, which du does not take in account



Do others have this kind of inconsistancy on their systems?
  

I would think everyone, who does not have changed the default settings
from mkfs.ext3.



I've another question. On my server root is 80% full and last weed it was 98% 
full. if it get to 100% , How can I delete or flush Journals to free some 
space?


best wishes
Platoali 



  


I think this may help you get more information.  What exactly does your 
server have installed?  What is it used for?  Web server?  File 
server?  DVR?  Could it be that some log file is growing and taking up 
that space?  How is your system partitioned?


I'm not guru but some more info may help.

Dale

:-)  :-) 



[gentoo-user] Re: df and du difference

2008-08-16 Thread Platoali
Sebastian Günther wrote:
 That is what the 5% are for, as you saw there where stated as not
 available but they are for the superuser for such things.

So there is no way to free some space from journals.


 BTW: Why is your root so full, or didn't you partionate your disk?

I did not partitioned it myself. This server is inherited to me from last 
admin.

~# df -h
FilesystemSize  Used Avail Use% Mounted on
/dev/sda1  19G   14G  3.5G  81% /
varrun2.0G   76K  2.0G   1% /var/run
varlock   2.0G 0  2.0G   0% /var/lock
udev  2.0G   88K  2.0G   1% /dev
devshm2.0G 0  2.0G   0% /dev/shm
/dev/sdb5  93G   59G   27G  69% /mnt/backup
/dev/mapper/main-usr   15G  601M   14G   5% /usr
/dev/mapper/main-var   30G  1.7G   27G   6% /var
/dev/mapper/main-db69G  9.5G   56G  15% /var/lib/postgresql
/dev/sdc1  68G   35G   30G  55% /home/archive

~#  du --max-dep 1  -c  -hx  /
4.2M/etc   
36M /tftpboot  
16K /lost+found
3.8G/tmp   
18M /boot  
1.4G/home  
8.0K/mnt   
12K /media 
254M/root  
4.0K/var   
4.0K/srv   
0   /sys   
4.0K/initrd
77M /lib
0   /proc
4.0K/opt
4.0K/usr
6.4M/sbin
3.5M/bin
0   /dev
5.5G/
5.5Gtotal

Last week, I was alarmed  that / root is 98 percent full. but I could not find 
any reason why server is full. and a restart freed  8 gig of space. but now it 
is again getting full slowly. 

Any comment?

best wishes
Platoali





Re: [gentoo-user] Re: df and du difference

2008-08-16 Thread Dale

Platoali wrote:

Sebastian Günther wrote:
  

That is what the 5% are for, as you saw there where stated as not
available but they are for the superuser for such things.



So there is no way to free some space from journals.

  

BTW: Why is your root so full, or didn't you partionate your disk?



I did not partitioned it myself. This server is inherited to me from last 
admin.


~# df -h
FilesystemSize  Used Avail Use% Mounted on
/dev/sda1  19G   14G  3.5G  81% /
varrun2.0G   76K  2.0G   1% /var/run
varlock   2.0G 0  2.0G   0% /var/lock
udev  2.0G   88K  2.0G   1% /dev
devshm2.0G 0  2.0G   0% /dev/shm
/dev/sdb5  93G   59G   27G  69% /mnt/backup
/dev/mapper/main-usr   15G  601M   14G   5% /usr
/dev/mapper/main-var   30G  1.7G   27G   6% /var
/dev/mapper/main-db69G  9.5G   56G  15% /var/lib/postgresql
/dev/sdc1  68G   35G   30G  55% /home/archive

~#  du --max-dep 1  -c  -hx  /
4.2M/etc   
36M /tftpboot  
16K /lost+found
3.8G/tmp   
18M /boot  
1.4G/home  
8.0K/mnt   
12K /media 
254M/root  
4.0K/var   
4.0K/srv   
0   /sys   
4.0K/initrd

77M /lib
0   /proc
4.0K/opt
4.0K/usr
6.4M/sbin
3.5M/bin
0   /dev
5.5G/
5.5Gtotal

Last week, I was alarmed  that / root is 98 percent full. but I could not find 
any reason why server is full. and a restart freed  8 gig of space. but now it 
is again getting full slowly. 


Any comment?

best wishes
Platoali

  


Sebastian may have more and better ideas but if a reboot gave you some space 
back, then you should check the tmp directories that are usually cleared when 
rebooting.  I notice that in your list /tmp takes up 3.8Gb which is a good bit. 
May want to see what is in there.

Just my thoughts.

Dale

:-)  :-) 






[gentoo-user] Re: df and du difference

2008-08-16 Thread Francesco Talamona
On Saturday 16 August 2008, Dale wrote:
 Sebastian may have more and better ideas but if a reboot gave you
 some space back, then you should check the tmp directories that are
 usually cleared when rebooting.  I notice that in your list /tmp
 takes up 3.8Gb which is a good bit. May want to see what is in there.

 Just my thoughts.

Absolutely right! Double check what's stuffing /tmp. You also could try 
to mount /tmp on a larger partition (like /usr and /var).

Ciao
Francesco

-- 
Linux Version 2.6.26-gentoo, Compiled #2 PREEMPT Sat Aug 9 20:21:11 CEST 
2008
One 1GHz AMD Athlon 64 Processor, 2GB RAM, 2004.04 Bogomips Total
aemaeth



Re: [gentoo-user] Re: df and du difference

2008-08-16 Thread Sebastian Günther
* Platoali ([EMAIL PROTECTED]) [16.08.08 11:14]:
 Sebastian Günther wrote:
  That is what the 5% are for, as you saw there where stated as not
  available but they are for the superuser for such things.
 
 So there is no way to free some space from journals.
 
 
  BTW: Why is your root so full, or didn't you partionate your disk?
 
 I did not partitioned it myself. This server is inherited to me from last 
 admin.
 
 ~# df -h
 FilesystemSize  Used Avail Use% Mounted on
 /dev/sda1  19G   14G  3.5G  81% /
 varrun2.0G   76K  2.0G   1% /var/run
 varlock   2.0G 0  2.0G   0% /var/lock
 udev  2.0G   88K  2.0G   1% /dev
 devshm2.0G 0  2.0G   0% /dev/shm
 /dev/sdb5  93G   59G   27G  69% /mnt/backup
 /dev/mapper/main-usr   15G  601M   14G   5% /usr
 /dev/mapper/main-var   30G  1.7G   27G   6% /var
 /dev/mapper/main-db69G  9.5G   56G  15% /var/lib/postgresql
 /dev/sdc1  68G   35G   30G  55% /home/archive
 
 ~#  du --max-dep 1  -c  -hx  /
 4.2M/etc   
 36M /tftpboot  
 16K /lost+found
 3.8G/tmp   
There is definetly to much in it...

 18M /boot  
 1.4G/home  
From the df I would have thought here is more in it...

Are there any normal users on this machine

 8.0K/mnt   
 12K /media 
 254M/root  
 4.0K/var   
 4.0K/srv   
 0   /sys   
 4.0K/initrd
 77M /lib
 0   /proc
 4.0K/opt
 4.0K/usr
 6.4M/sbin
 3.5M/bin
 0   /dev
 5.5G/
 5.5Gtotal
 
OK here is a diference to big to be normal between df and du.

14GB against 5.5GB

We are definetly missing something...

 Last week, I was alarmed  that / root is 98 percent full. but I could not 
 find 
 any reason why server is full. and a restart freed  8 gig of space. but now 
 it 
 is again getting full slowly. 
 
That's /tmp: try to watch, what actually is writing in it.

 Any comment?
 
 best wishes
 Platoali
 


There is something wrong in the state of denmark...
Sebastian

-- 
  Religion ist das Opium des Volkes.   Karl Marx

 [EMAIL PROTECTED]@N GÜNTHER mailto:[EMAIL PROTECTED]


pgplM3aMmhUdr.pgp
Description: PGP signature


[gentoo-user] Re: df and du difference

2008-08-16 Thread Platoali
 Ward Poelmans wrote:
 You can find those files with lsof | grep deleted. Try closing the
 process with deleted files and suddenly your du en df will give the
 same free diskspace.
 Ofcourse, a reboot does also the trick.



lsof | grep -i deleted
...
 /dev/console (deleted)
mysqld 5679mysql5u  REG8,1  01009860 
/tmp/iby8kN8L (deleted)
mysqld 5679mysql6u  REG8,1  01009861 
/tmp/ib3OyWjn (deleted)
mysqld 5679mysql7u  REG8,1  01009862 
/tmp/ibCqa6uY (deleted)
mysqld 5679mysql8u  REG8,1  01009863 
/tmp/ibnDCmHz (deleted)
mysqld 5679mysql   12u  REG8,1  01009864 
/tmp/ibaQcs5a (deleted)
...


Nothing so big. just about 20 lines and the biggest ones are these.

This server hosts accounting software for an ISP:  just a couple  python 
scripts, apache with PHP and a small Postgresql database.

Bests
Platoali
t



[gentoo-user] Re: df and du difference

2008-08-16 Thread Platoali
 Sebastian Günther wrote:
 OK here is a diference to big to be normal between df and du.

 14GB against 5.5GB

 We are definetly missing something...


Yes, that is the strange thing. 

  Last week, I was alarmed  that / root is 98 percent full. but I could not
  find any reason why server is full. and a restart freed  8 gig of space.
  but now it is again getting full slowly.

 That's /tmp: try to watch, what actually is writing in it.

I will  add a new hard and mount /tmp to it. I thing that is them most 
sensible solution.



Thanks 
Platoali



Re: [gentoo-user] Re: df and du difference

2008-08-16 Thread Sebastian Günther
* Platoali ([EMAIL PROTECTED]) [16.08.08 13:13]:
  Sebastian Günther wrote:
  OK here is a diference to big to be normal between df and du.
 
  14GB against 5.5GB
 
  We are definetly missing something...
 
 
 Yes, that is the strange thing. 
 
This should definetly be investigated. This could be a hint that there 
is someone else using this server, e.g. it could be hacked...

   Last week, I was alarmed  that / root is 98 percent full. but I could not
   find any reason why server is full. and a restart freed  8 gig of space.
   but now it is again getting full slowly.
 
  That's /tmp: try to watch, what actually is writing in it.
 
 I will  add a new hard and mount /tmp to it. I thing that is them most 
 sensible solution.
 

No, you should definetly find out, who is writing such an enourmous 
amount of data into your /tmp.

This is not OK, especially, if you can't find, what this actually is.

 
 
 Thanks 
 Platoali
 

A sysadmin has always to be paranoid. And if I don't know what's going 
on THEY are involved...

concerned
Sebastian

-- 
  Religion ist das Opium des Volkes.   Karl Marx

 [EMAIL PROTECTED]@N GÜNTHER mailto:[EMAIL PROTECTED]


pgp9p9n0KPw8J.pgp
Description: PGP signature