On Wed, Sep 29, 2004 at 12:08:54AM +0100, Gerard Robin wrote: > On Tue, Sep 28, 2004 at 11:28:31PM +0200, Frank Gevaerts wrote: > > > > On Tue, Sep 28, 2004 at 11:07:03PM +0100, Gerard Robin wrote: > > > > > > Hello, > > > I have a problem with my partition /var which seems to be too small. > > > When it is full my system deosn't work fine, for example: fetchmail can't > > > download my messages in /var/mail/mylogin. > > > To solve the problem temporarily, I have removed the biggest files in > > > /var/log/. > > > How can I solve this problem neatly ? > > > Thinks in advance for your reply or for a link which gives me a hint > > > for good solution ? > > > > > > "df -h" displays : > > > > > > Sys. de fich. Tail. Occ. Disp. %Occ. Mont? sur > > > /dev/hda2 464M 139M 302M 32% / > > > tmpfs 253M 0 253M 0% /dev/shm > > > /dev/hda3 3,2G 1,7G 1,4G 55% /usr > > > /dev/hda6 92M 22K 87M 1% /tmp > > > /dev/hda7 464M 411M 29M 94% /var > > > /dev/hda8 1,9G 530M 1,2G 31% /home > > > /dev/fd0 1,4M 745K 679K 53% /floppy > > > > > > "du -hs /var" displays > > > > > > 89M /var > > > > > > 411M != 89M ? > > > > I guess there is a program running that still has some removed files > > open. Try restarting sysklogd, or rebooting. > > > > Frank > > Thanks Frank, > when I reboot it's ok: 89M = 89M :-). But I would like to know if I could > get the same result by an other way.
The "problem" is caused by the way Unix filesystems work : a file exists on disk as long as there is at least one reference to it. References can be a process thart has the file open, or a filename in a directory. What people think of as removing a file actually only removes the filename. The trick is to find which process has the file open. You might try the lsof command for that, or remembering which large files you recently deleted. Once you find the process, restarting it should be sufficient. I once had a similar problem where I had made an iso image, loopback mounted it, forgot about the mount, and rm'ed the iso. Instant 650 MB lost, until (some weeks later) I noticed this and unmounted the iso. Frank > Thanks again. > > -- > Gerard -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]