Web Hosting Talk







View Full Version : Dir / becoming full rappidly


Domenico
02-05-2002, 06:44 AM
Disk /hda7 (/) 94 %

How can I bring this down a lot?
I'm deleting the /tmp dir every day but this is not enough anymore.

Thank you!
Domenico

priyadi
02-05-2002, 06:55 AM
You didn't provide enough information. How is your file system layout? Do you separate /home, /usr, and/or /var partition? What's the role of the server?

In any case, try using 'du' to determine which part of the filesystem that is filling up your disk.

Walter
02-05-2002, 07:05 AM
Yes, do a 'du -h --max-depth=1' to see where the space is wasted and go down the directory tree.

Domenico
02-05-2002, 07:07 AM
Sorry, my mistake.

Disk /hda7 (/) 94 %
Disk /hda1 (/boot) 10 %
Disk /hda9 (/home) 1 %
Disk /hda5 (/usr) 32 %
Disk /hda6 (/var) 10 %

This server is used for hosting and has many customers on it.

root@host [/]# du -h --max-depth=1
16k ./lost+found
3.5M ./boot
418M ./home
1.2G ./usr
87M ./var
du: cannot change to directory `./proc/13729/fd': No such file or directory
du: `./proc/10246/fd/4': No such file or directory
256M ./proc
12M ./tmp
268k ./dev
7.3M ./etc
5.0M ./bin
40M ./lib
12k ./mnt
89M ./opt
89M ./root
5.0M ./sbin
0 ./misc
1.9M ./scripts
12k ./update
320k ./mail
4.0k ./old-
4.0k ./old-var
4.0k ./old-usr
4.0k ./old-home
32k ./micq.log
4.0k ./home2
4.0k ./initrd
135M ./backup
2.4G .

DavidU
02-05-2002, 11:41 AM
Try cleaning out

/opt

/root

and

/backup

also, what is in /

You might have some huge core files or backups sitting in there...

-davidu

priyadi
02-05-2002, 02:07 PM
You can recover a large amount of your root partition space by moving and symlinking opt and backup to other partition (such as /usr).