/u01 is filling up -how to know the large files


 
Thread Tools Search this Thread
Operating Systems Solaris /u01 is filling up -how to know the large files
# 1  
Old 04-30-2015
/u01 is filling up -how to know the large files

hi,
my /u01 size is filling up and now reached to 93% on node 1 and 91% on node 2. it is usually very easy to identify large files normally dumps files or audit files etcetra but in this case i am not getting it as i am giving the following command to find the 5 biggest files of the file system but it return files with low size and dont know what actually eating the space

Code:
-bash-3.00$du -a /u01/ | sort -n -r |head -n 5
47130586      /u01
45352902      /u01/app
23009666      /u01/app/11.2.0
2300964       /u01/app/11.2.0/grid
22335572      /u01/app/oracle


Now the largets file is 44.94 mb so how to find the largest file or where is my space

please guide

thanks

Regards

Last edited by DukeNuke2; 04-30-2015 at 09:01 AM..
# 2  
Old 04-30-2015
If you'd been deleting files which happened to still be open, they won't be truly removed from disk until whatever had them open, closes them. This is a common trap new administrators fall into.
# 3  
Old 04-30-2015
Have a look at the manual page to fuser

There is usually a flag or combination (dependant on your OS version) that you can use against the filesystem to show up open/deleted files and the processes using them. If you can safely terminate those processes, then the space occupied by those files will become free again.

We've all been there.



Robin
# 4  
Old 04-30-2015
@rbatte1 You might be confusing fuser with pfiles. The former is telling what users have a handler on a given file given its path while the latter gives information about files open by a given process.

Only the latter can be useful to identify big files that have been removed.
# 5  
Old 04-30-2015
Your list shows directories first, as they usually are larger than files in du. To get at the files only, try
Code:
find . -type f -printf "%s %p\n" | sort -nr | head

# 6  
Old 05-05-2015
Quote:
Originally Posted by jlliagre
@rbatte1 You might be confusing fuser with pfiles. The former is telling what users have a handler on a given file given its path while the latter gives information about files open by a given process.

Only the latter can be useful to identify big files that have been removed.
Apologies, it is my history with AIX that clouds my judgement, AIX fuser

The lsof tool can also provide some information I think.



Robin
# 7  
Old 05-05-2015
My preferred method of doing this is to "zoom in" into the filesystem: i use du -ks * | sort -n on a certain level to find out which file/directory is using most. Then i investigate directories high up on this list again by changing into them and repeating the procedure.

For instance:

Code:
# # du -ks /var/* | sort -n
0       /var/aacct
0       /var/cim
0       /var/empty
0       /var/ha
0       /var/lib
0       /var/lost+found
0       /var/msgs
0       /var/ncs
0       /var/news
0       /var/pconsole
0       /var/probevue
0       /var/security
0       /var/snapp
0       /var/symapi
0       /var/tss
0       /var/yp
4       /var/statmon
4       /var/suma
4       /var/websm
8       /var/locks
8       /var/run
8       /var/tivoli
24      /var/dt
36      /var/krb5
52      /var/ssl
120     /var/esa
160     /var/preserve
516     /var/tmp
9828    /var/ecc
15140   /var/log
16208   /var/ct
18008   /var/perf
22096   /var/spool
101360  /var/adm
513168  /var/opt

Therefore i try "/var/adm" and "/var/opt":
Code:
# du -ks /var/opt/* | sort -n
0       /var/opt/freeware
0       /var/opt/tivoli
112324  /var/opt/perf
400856  /var/opt/OV

# du -ks /var/adm/* | sort -n
0       /var/adm/acct
0       /var/adm/corrals
0       /var/adm/ffdc
0       /var/adm/nim
0       /var/adm/perfmgr
0       /var/adm/sa
0       /var/adm/streams
0       /var/adm/wpars
4       /var/adm/SUchecklog.chk
4       /var/adm/SUreport.chk
4       /var/adm/dev_pkg.fail
4       /var/adm/dev_pkg.success
4       /var/adm/pconsole
4       /var/adm/sulog
4       /var/adm/wtmp
8       /var/adm/SRC
8       /var/adm/esa
8       /var/adm/ml
12      /var/adm/ena_lg_send_virt_eth.log
12      /var/adm/sni
16      /var/adm/sw
40      /var/adm/hfi
448     /var/adm/config
1912    /var/adm/invscout
3884    /var/adm/ras
94980   /var/adm/cron

etc., etc.. This way i get a quick picture of where most of the space in /var is going to.

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Merging two text files by a column and filling in the missing values

Hi, I have to text files that I want to merge by the first column. The values in the first column pretty much match for the first part. However there are some values that are present in column 1 and not present in column 2 or vice versa. For such values I would like to substitute X for the... (9 Replies)
Discussion started by: evelibertine
9 Replies

2. UNIX for Dummies Questions & Answers

Lot of warn files filling /

hi guys I have suse 11 sp1 and I have a lot of warn file filling / these are under /var/log there's this big one -rw-r----- 1 root root 3.9G Feb 1 10:28 warn warn: ASCII text and the others that are about 2.5 to 3MB - they are about 130 warn-*.bz2 -rw-r----- 1 root root 3.9G Feb... (2 Replies)
Discussion started by: karlochacon
2 Replies

3. Solaris

How to safely copy full filesystems with large files (10Gb files)

Hello everyone. Need some help copying a filesystem. The situation is this: I have an oracle DB mounted on /u01 and need to copy it to /u02. /u01 is 500 Gb and /u02 is 300 Gb. The size used on /u01 is 187 Gb. This is running on solaris 9 and both filesystems are UFS. I have tried to do it using:... (14 Replies)
Discussion started by: dragonov7
14 Replies

4. Shell Programming and Scripting

Divide large data files into smaller files

Hello everyone! I have 2 types of files in the following format: 1) *.fa >1234 ...some text... >2345 ...some text... >3456 ...some text... . . . . 2) *.info >1234 (7 Replies)
Discussion started by: ad23
7 Replies

5. UNIX for Dummies Questions & Answers

Renaming Large Files

When I have a file for example with the wrong name I normally use the cp {filename} {new filename} comand so I will have the original as well as the correct named file. Just for backup purposes. Problem: I have a file that is 24gb with a case sensitive filename. The file was named with upper... (3 Replies)
Discussion started by: trek88
3 Replies

6. UNIX for Dummies Questions & Answers

display large files

I'm looking to display the largest files in a file system without descending into subdirectories. The / file system is 65% full and I'm looking to display only the files in / without taking into consideration other filesystem/directories. I can execute this command du -sk ./* |sort -nr... (2 Replies)
Discussion started by: Steelysteel
2 Replies

7. UNIX for Dummies Questions & Answers

large files?

How do we check 'large files' is enabled on a Unix box -- HP-UX B11.11 (2 Replies)
Discussion started by: ranj@chn
2 Replies

8. UNIX for Dummies Questions & Answers

Large files

I am trying to understand the webserver log file for an error which has occured on my live web site. The webserver access file is very big in size so it's not possible to open this file using vi editor. I know the approximate time the error occured, so i am interested in looking for the log file... (4 Replies)
Discussion started by: sehgalniraj
4 Replies

9. UNIX for Advanced & Expert Users

large files in 32 bits?

How I can call routines for write large files' text if I've a libraries that can't be compiled in 64 bits? I tried whit open O_LARGEFILE option but if I see the rows whith cat are strange because I only see the first one. (1 Reply)
Discussion started by: glfuentes
1 Replies
Login or Register to Ask a Question