FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 06-29-2010, 01:18 PM
Benjamin Griese
 
Default disk usage

That could help you if there are open files which are not deleted.I had that sometimes in the past, where a ugly-written script for logration moved away some logfiles and created a new one at the same place with the old name.
In this case the old file was in use by the process which writes to this process while moving and the filesystem for the logfile slowly grew up for no appearent reason.
Good luck!

http://www.ibm.com/developerworks/aix/library/au-lsof.html

Listing 5. Using lsof on Linux to look for a deleted file


# lsof | grep error_log
httpd 2452 root 2w REG 33,2 499 3090660
/var/log/httpd/error_log (deleted)
httpd 2452 root 7w REG 33,2 499 3090660
/var/log/httpd/error_log (deleted)
... more httpd processes ...
On Tue, Jun 29, 2010 at 15:08, Dirk Deimeke <dirk@deimeke.net> wrote:

Answering Kaushal Shriyan <kaushalshriyan@gmail.com>


(Tue, 29 Jun 2010 17:43:52 +0530):



Hi,



are you sure, no one (program, daemon, human being) is using any

deleted files?



If you are not sure consider a shutdown of all services or eventually

a complete reboot.



> Please suggest further



Your blocksize is 4096, so regardless of the size of the file it will

use at minimum 4k.



If you want to take the effort you can check for wasted space.



For example

find /home /usr *-size -4096c | wc -l

shows you a count of files which are smaller than 4096 bytes.



Cheers



Dirk



--

Kontakt: http://d5e.org/contact

Blog: * *http://dirk.deimeke.net/

Podcast: http://deimhart.net/



--

ubuntu-server mailing list

ubuntu-server@lists.ubuntu.com

https://lists.ubuntu.com/mailman/listinfo/ubuntu-server

More info: https://wiki.ubuntu.com/ServerTeam



--
To be or not to be -- Shakespeare | To do is to be -- Nietzsche | To be is to do -- Sartre | Do be do be do -- Sinatra


--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 06-29-2010, 03:00 PM
"Aaron C. de Bruyn"
 
Default disk usage

On 2010-06-29 at 16:43:53 +0530, Kaushal Shriyan wrote:
> Hi,
>
> I see df -h and du -hs difference.
>
> root@test:/# du -hs * | grep G
> 2.4G home
> du: cannot access `proc/1027/task/1027/fd/4': No such file or directory
> du: cannot access `proc/1027/task/1027/fdinfo/4': No such file or directory
> du: cannot access `proc/1027/fd/4': No such file or directory
> du: cannot access `proc/1027/fdinfo/4': No such file or directory
> 9.5G usr

You do realize the command 'du -hs * | grep G' will tally up the
space used by each directory and then *filter out* anything that
doesn't have a 'G' in it?

In other words, 'du -hs *' could be counting tens or hundreds of
directories that could be up to 999 MB in size *each*, but your
grep command is filtering them out.

From the example above, 2.4G for home and 9.5G for usr add up to
~12 GB.

The difference between the 'used' space in your 'df -h' command
and what you think is 'missing' is ~12 GB.

So I think you need to remove the '| grep G' from your 'df' command
and you will see what is taking up all the space.

(If you are doing 'du -hs *' from your root directory, you will
need to ignore the size of /proc, /dev, and /sys.

> root@test:~# df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/sda1 70G 55G 15G 79% /
<snip>

You have 55 GB used, of which you can account for ~12 GB used
by /home and /usr. That leaves ~43 unaccounted for--which is
being filtered out by only showing folders that are measured
as being 1 or more gigabytes.

-A

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 07-08-2010, 11:18 AM
Kaushal Shriyan
 
Default disk usage

Hi,

I have a weird issue about disk space on Ubuntu Hardy Server 8.04. I
do not get count of approximately 43Gb, I have rebooted the server
too. It did not worked too. Please suggest.

root@test:/# du -hs /* /.[^.]*
0 /backuplogdir
0 /backuplogdir_oct09
6.1M /bin
36M /boot
803G /deliveryreports
36K /dev
7.7M /etc
2.7G /home
0 /initrd
0 /initrd.img
0 /initrd.img.old
240M /lib
0 /lib64
98G /logfiles
0 /log-test
0 /media
0 /mnt
0 /opt
du: cannot access `/proc/21175/task/21175/fd/4': No such file or directory
du: cannot access `/proc/21175/task/21175/fdinfo/4': No such file or directory
du: cannot access `/proc/21175/fd/4': No such file or directory
du: cannot access `/proc/21175/fdinfo/4': No such file or directory
0 /proc
0 /REC-test
68K /root
7.8M /sbin
0 /srv
0 /sys
732G /tmp
5.6G /usr
460M /var
0 /vmlinuz
0 /vmlinuz.old
du: cannot access `/.[^.]*': No such file or directory
root@test:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 70G 51G 19G 74% /
varrun 3.6G 64K 3.6G 1% /var/run
varlock 3.6G 0 3.6G 0% /var/lock
udev 3.6G 32K 3.6G 1% /dev
devshm 3.6G 0 3.6G 0% /dev/shm
/dev/sda5 464M 46M 394M 11% /boot
ent-nfs:/mnt/data3/RECEIPTS
1.1T 1.1T 52G 96% /deliveryreports/RECEIPTS
ent-nfs:/mnt/data2/logfiles
1.1T 99G 1020G 9% /logfiles
core-logging:/tmp/backuplogdir
927G 844G 84G 92% /tmp/backuplogdir
root@test:/#

Thanks,

Kaushal

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 10:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org