free some space in file system


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers free some space in file system
# 1  
Old 04-10-2008
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  
Old 04-10-2008
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  
Old 04-10-2008
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  
Old 04-10-2008
post the output of:

Code:
# df -k (better h if possible)
# mount
# metastat -p

and lets have a look at your config...
# 5  
Old 04-10-2008
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  
Old 04-11-2008
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  
Old 04-11-2008
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.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

No space in the file system

A file system has reached 100%. I have tried adding space using chfs -a size=+100 command to that file system. However, the % used is not decreasing from 100%. Is there a way to add more space? Also, can someone suggest a script to send a mail alert when a file system is reaching 90%. G (4 Replies)
Discussion started by: ggayathri
4 Replies

2. HP-UX

Increasing space in file system

Hi Friends, I want to cut space from one file system and add in another file system. For example I have 100 gb space in /oracle/TST/oraarch I wnat to cut 50 gb from this file system and add 50 in /oracle/TST/sapdata1. Please hel, How I can do it. Regards, Bhagawati Pandey (3 Replies)
Discussion started by: BPANDEY
3 Replies

3. Fedora

Need to incrwase PHYSICAL VOLUME space on hard drive with free space on it

Hi, I run Fedora 17. I created a physical volume of 30GB on a disk with 60GB of space so there is 30GB of free space. On the physical volume, I created my volume group and logical volumes. I assigned all the space in the physical volume to my volume group. I need to add the 30GB of free space... (1 Reply)
Discussion started by: mojoman
1 Replies

4. Solaris

No space left on device but free space and inodes are available...

hi guys, me again ;) i recently opened a thread about physical to zone migration. My zone is mounted over a "bigger" LUN (500GB) and step is now to move the old files, from the physical server, to my zone. We are talking about 22mio of files. i used rsync to do that and every time at... (8 Replies)
Discussion started by: beta17
8 Replies

5. Shell Programming and Scripting

Get free space of file system

Hi guys, I'm trying to get free space in GB of file system into parameter. I have the following code: > cat get_free_space_FS.ksh #! /bin/ksh FS=/dw/mar FreeSpace=`df -h | grep $FS | awk '{print $4}'` echo $FreeSpace > ./get_free_space_FS.ksh 362G My question is ,how can I cut in... (4 Replies)
Discussion started by: nir_s
4 Replies

6. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

7. UNIX for Dummies Questions & Answers

free space, used space in ftp

Is possible to see how much available space there is on a ftp server and how much is used through ftp ? how ? free space: used space: thanks (1 Reply)
Discussion started by: aneuryzma
1 Replies

8. Programming

How to get free disk space size in C/C++ program( Solaris system)

How to get free disk space size in C/C++ program( Solaris system)? Is there any standard function or system function? Just like "df" or "getdfree" in Linux. (4 Replies)
Discussion started by: yidu
4 Replies

9. Solaris

Lost space on file system

Hi everybody, I got a problem on my SUN server in Solaris 9. I'll try to explain, if somebody could help me. I have mounted some volumes in RAID 0+1, that is stripped slices and then mirror. To be clear the result of metastat d80 is as follow : d80: Mirror Submirror 0: d81 State:... (2 Replies)
Discussion started by: aribault
2 Replies

10. UNIX for Dummies Questions & Answers

Free size for File System

How to find the free size currently FileSystem has, on the disk mounted? I know 'df' lists all the mounted disks, but I am interested to know details for the filesystem, in which currently I am working. (7 Replies)
Discussion started by: videsh77
7 Replies
Login or Register to Ask a Question