Re: [gentoo-user] Re: File system full issues

2006-02-15 Thread Mark Knecht
On 2/15/06, Neil Bothwick <[EMAIL PROTECTED]> wrote:
> On Wed, 15 Feb 2006 19:09:05 +0100, Maarten wrote:
>
> > So run a 'du -s' on /mnt/* (if that is your mountpoint) after unmounting
> > all network shares (a mounted dir can hide a file!).
>
> Or you could save unmounting anything by doing
>
> mount --bind / /mnt/tmp
> du -sch /mnt/tmp/*
>
>
> --
> Neil Bothwick

Hi Neil and others,
   In the end there were a few reasons disk space got filled up. The
main culprit was that watching live TV within MythTV creates a ring
buffer file. In my case it was about 750MB. Normally this file is
erased but for some reason it was left behind sometime recently. Add a
few new emerges to the system and we went over the top.

   After removing a few unnecessary packages and finding the one large
file I was back to 83% disk usage. At that point MythTV started doing
it's updates again and everything is back to normal.

   Thanks to those who answered. I've saved your responses for this
sort of problem in the future.

Cheers,
Mark

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: File system full issues

2006-02-15 Thread Neil Bothwick
On Wed, 15 Feb 2006 19:09:05 +0100, Maarten wrote:

> So run a 'du -s' on /mnt/* (if that is your mountpoint) after unmounting
> all network shares (a mounted dir can hide a file!).

Or you could save unmounting anything by doing

mount --bind / /mnt/tmp
du -sch /mnt/tmp/*


-- 
Neil Bothwick

Quantum Physics: The dreams that stuff is made of


signature.asc
Description: PGP signature


Re: [gentoo-user] Re: File system full issues

2006-02-15 Thread Maarten
James wrote:
> Mark Knecht  gmail.com> writes:
> 
> 
> 
>>OK, good info - but what can I remove? Or more important how can I
>>find what's talking up too much space. /home, /usr/portage and /var
>>are on partitions of their own. There is about 200MB of Java stuff in
>>/opt and I deleted everything in /tmp before I wrote the first note.

The first question to ask is "Did it fill up slowly or has it filled up
 fairly quickly?"  If it was quick, chances are a runaway process did
something, like write a big coredump, a log which filled up due to
errors, a file copy that didn't fit, stuff like that.

Now you mention that the most likely point for that trouble are
accounted for (/tmp, /var). You also mention you use MythTV over the
network. So I would look at the (NFS?) mountpoint first; it happened to
me that the share wasn't mounted, and mythtv then happily fills up the
partition on which the mountpoint resides, ie. /.
So run a 'du -s' on /mnt/* (if that is your mountpoint) after unmounting
all network shares (a mounted dir can hide a file!).
Next, run du -s on the files and dirs in /root/. Maybe logging or cache
was written there (don't forget the dot-entries!)
Also, look into /usr/src and remove sources you can miss.

If nothing helps there, you best run a 'du -s /*' but you better umount
everything that isn't essential first.  And even then, it's slw...

In the case it filled up slowly you are worse off. You then know you
have to remove stuff you may need instead of just finding 'the culprit'.
Look carefully into the entire tree and decide what you need and what
you can do without. Likely candidates are Howtos and such, but they
reside under /usr/share so it's likely they aren't on your / filesystem.
They are small, too, so you don't gain that much.
One you have space, you can gain much more by gzipping stuff (especially
mysqldumps, logs, etc) but as you stated /var is on it's own partition I
fear there will not be much to gzip anyway...

One last remark: It happened to me on occasion that a filesystem keeps
at 100% full until you reboot the box. It may be that a process still
has files open, or that an fsck is in order, or whatever.  This is the
reason you should never let / fill up; it doesn't always recover very
gracefully, at least that has been my experience.  I still have to guess
at the exact reason that stays-at-100% happens, if anyone can explain...

Good luck,
Maarten

> 
> Well the first thing you need to do, is run a 'df' and see which
> partitions are full. Then used these tools to find files by size and
> date. Let's assume we're talking about /usr/portage/distfiles
> 
> for example:
> 
> REMOVING LARGE FILES IN /usr/portage/distfiles
> find ./ -size +10  -exec ls -lag {} \; | less   
> find ./ -size +10 -print -exec rm {} \; 
> 
> 
> You can then changethe size and work your way down. 
> 
> Now let's look at old files in /usr/portage/disfiles
> 
> REMOVING OLD FILES IN /usr/protage/distfiles
> find ./ -mtime +180 -exec ls -lag {} \; | less
> find ./ -mtime +180 -print -exec rm {} \;
> 
> 
> It really helps if you do this a the 90% point, and avoid
> sluggish behavior.
> 
> Look at /home too. If you have one big partition, as recommended
> in the handbook then removing any files will help.
> 
> /usr/src/* is another place to remove kernel sources, similarly,
> /boot/
> 
> Be cautions!
> 
> hth,
> James
> 

-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] Re: File system full issues

2006-02-15 Thread James
Mark Knecht  gmail.com> writes:


> OK, good info - but what can I remove? Or more important how can I
> find what's talking up too much space. /home, /usr/portage and /var
> are on partitions of their own. There is about 200MB of Java stuff in
> /opt and I deleted everything in /tmp before I wrote the first note.

Well the first thing you need to do, is run a 'df' and see which
partitions are full. Then used these tools to find files by size and
date. Let's assume we're talking about /usr/portage/distfiles

for example:

REMOVING LARGE FILES IN /usr/portage/distfiles
find ./ -size +10  -exec ls -lag {} \; | less   
find ./ -size +10 -print -exec rm {} \; 


You can then changethe size and work your way down. 

Now let's look at old files in /usr/portage/disfiles

REMOVING OLD FILES IN /usr/protage/distfiles
find ./ -mtime +180 -exec ls -lag {} \; | less
find ./ -mtime +180 -print -exec rm {} \;


It really helps if you do this a the 90% point, and avoid
sluggish behavior.

Look at /home too. If you have one big partition, as recommended
in the handbook then removing any files will help.

/usr/src/* is another place to remove kernel sources, similarly,
/boot/

Be cautions!

hth,
James

-- 
gentoo-user@gentoo.org mailing list