Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Systematic approach Full FileSystems 1

Status
Not open for further replies.

NattyP

MIS
Sep 1, 2001
45
JM
I am attempting to develop a structured approach to dealing with a file system at 100% (or near a threshold). I know that proper monitoring should prevent that but bear with me.

I am thinking about 2 situations

1. A file system may have shot up very quickly. In this case I would run a find command to list all file modified in the last 2 days on that file system and manually assess which one it might be the cause.
2. A file system may be getting near to a threshold and may go over soon. I am thinking I would first determine all the directories in that file system (right now I don’t have an easy way to do this), then run a du –hs <directory> on each one to see which ones have the most, then manually dig into each directory recursively looking for old or useless files that can be archived or deleted.

Is there any other suggestion, step or checks that you would do?
 
Here's how I find the directories that are taking up the most space...
Code:
du -kod /export/home | sort -rn | head -20
That would get the 20 top directories by size in the [tt]/export/home[/tt] file system. Replace [tt]/export/home[/tt] with whatever filesystem is filling up or full.
 
Thanks for the feedback. I will open the SunSolve account as suggested.
 
SamBones said:
Here's how I find the directories that are taking up the most space...

Code:
du -kod /export/home | sort -rn | head -20

Well, that pretty much renders my dispus script redundant in one fell swoop; how come I never noticed those "o" and "d" options before! [blush] Much quicker too!


Annihilannic.
 
And this will find the 20 biggest files in a particular file system...
Code:
find /export/home -mount -type f -exec du -k {} \; | sort -rn | head -20
This doesn't list directory totals, just the files themselves.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top