The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find a file whick is consuming larger disk space in file system lokeshpashine UNIX for Dummies Questions & Answers 6 04-04-2009 02:52 AM
How to get free disk space size in C/C++ program( Solaris system) yidu High Level Programming 4 01-30-2009 12:49 AM
Lost space on file system aribault SUN Solaris 2 03-06-2006 04:43 AM
Root File system Space cgege HP-UX 2 04-13-2005 04:21 PM
Free size for File System videsh77 UNIX for Dummies Questions & Answers 7 02-03-2005 06:44 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-10-2008
fu4d fu4d is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 4
free some space in file system

dear all,


I have some problem in my file system :
df -k result :
...
/dev/md/dsk/d3 3101839 2736380 303423 91% /var
...
it occupied around 2.7 gb
but when I tried command
du -sk /var
813991 /var
so /var only have around 800Mb , Do you know why there is many difference between df -k and du -sk command ?
Do you have any tips to free some space in /var ?

Cheers,
-fuad-
  #2 (permalink)  
Old 04-10-2008
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,947
try maybe something like this:

du -sk /var/*

have a look at /var/tmp for deleting files. also there might be unneeded logs in /var/adm or /var/log (depends on your os).

hth,
DN2
  #3 (permalink)  
Old 04-10-2008
fu4d fu4d is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 4
I have run du -sk in /var directory and subdirectory inside it, and also run find to search for file that has large size but it doesn't help much. Now I run out ideas.

I curious why there is so much difference in the result of df -k and du -sk , do I need to reboot my server ?

thanks,
-Fuad-
  #4 (permalink)  
Old 04-10-2008
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,947
post the output of:

Code:
# df -k (better h if possible)
# mount
# metastat -p
and lets have a look at your config...
  #5 (permalink)  
Old 04-10-2008
ghostdog74 ghostdog74 is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2006
Posts: 2,507
you might also want to search for files that are .zip, .tar.gz, .log[s] , or files with size +20Mb etc etc using the find command.
  #6 (permalink)  
Old 04-11-2008
fu4d fu4d is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 4
df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 3101839 2286604 753199 76% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/md/dsk/d3 3101839 2599387 440416 86% /var
swap 2061520 32 2061488 1% /var/run
swap 256000 2176 253824 1% /tmp
/dev/md/dsk/d4 57027422 7085383 49371765 13% /export/home

metastat -p
d0 -m d10 d20 1
d10 1 1 c1t0d0s0
d20 1 1 c1t1d0s0
d1 -m d11 d21 1
d11 1 1 c1t0d0s1
d21 1 1 c1t1d0s1
d3 -m d13 d23 1
d13 1 1 c1t0d0s3
d23 1 1 c1t1d0s3
d4 -m d14 d24 1
d14 1 1 c1t0d0s4
d24 1 1 c1t1d0s4

mount
/ on /dev/md/dsk/d0 read/write/setuid/intr/largefiles/logging/onerror=panic/dev=1540000 on Thu Mar 8 02:25:20 2007
/proc on /proc read/write/setuid/dev=4c40000 on Thu Mar 8 02:25:19 2007
/dev/fd on fd read/write/setuid/dev=4d00000 on Thu Mar 8 02:25:24 2007
/etc/mnttab on mnttab read/write/setuid/dev=4e00000 on Thu Mar 8 02:25:26 2007
/var on /dev/md/dsk/d3 read/write/setuid/intr/largefiles/logging/onerror=panic/dev=1540003 on Thu Mar 8 02:25:27 2007
/var/run on swap read/write/setuid/dev=1 on Thu Mar 8 02:25:27 2007
/tmp on swap read/write/setuid/size=250m/dev=2 on Thu Mar 8 02:25:31 2007
/export/home on /dev/md/dsk/d4 read/write/setuid/intr/largefiles/logging/onerror=panic/dev=1540004 on Thu Mar 8 02:25:32 2007
  #7 (permalink)  
Old 04-11-2008
wempy's Avatar
wempy wempy is offline
Registered User
  
 

Join Date: Jun 2006
Location: Harpenden, UK
Posts: 208
if du -k /var gives a different result to du -xk /var then you may have some data being left behind at the mount point /var/run. How you get to it will be OS dependent, but you will probably want to bring the machine to single user mode, and turn off as many services as you can. Then try umount /var/run. If it unmounts then have a look at the mount point to see if there is any data there (ls -l /var/run). If so, delete it and remount the partition.

Though, it is very strange that du gives a different usage result to df.

btw the -x switch to du keeps it on the starting filesystem, so it shouldn't go off into the mounted /var/run.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0