LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-16-2009, 02:19 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Rep: Reputation: 32
A question about showing disk space


I use df -h to list the used disk and get followings:
Code:
[root@s003ap02-test ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_root-lv_root
                      3.0G  2.3G  599M  80% /
/dev/sda1              99M   15M   80M  16% /boot
none                  3.0G     0  3.0G   0% /dev/shm
/dev/mapper/vg_root-lv_home
                      496M  381M   90M  81% /home
/dev/mapper/vg_root-lv_opt
                      7.9G  3.3G  4.3G  44% /opt
/dev/mapper/vg_root-lv_tmp
                      496M   73M  398M  16% /tmp
/dev/mapper/vg_root-lv_var
                      2.0G  1.1G  826M  57% /var
[root@s003ap02-test ~]#
One can see the /home uses 381 MB space.

As I try to list the detail I get followings:
Code:
[root@s003ap02-test ~]# du -sh /home/*
8.0K    /home/a5xcn81
8.0K    /home/a5xd8t0
8.0K    /home/a5xdea1
8.0K    /home/a5xjkh0
8.0K    /home/a5xkb41
8.0K    /home/a5xnhp0
8.0K    /home/a5xoy41
194M    /home/a5xsuuser
8.0K    /home/a5xx2u1
371K    /home/documaker
5.0K    /home/idcext2
12K     /home/lost+found
[root@s003ap02-test ~]#
I can't see the summe is 381 MB.

Someone knows why?
 
Old 10-16-2009, 03:52 AM   #2
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
Hi thomas2004ch,

Try the command:

Code:
$ du -shc /home
The glob might be causing you problems.
 
Old 10-16-2009, 03:52 AM   #3
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
Reserved Block Count

Okay, you're "Reserved Blocks Percentage" might be a wee bit too high on that filesystem.
Back in the days of old, when disks were smaller, the default behavior for mkfs.ext2 and mkfs.ext3 was to set a "Reserved Blocks Percentage" to 5%.

Traditionally, this is so root-owned processes can still write space when bad little users processes max-out filesystems.

To see how many blocks are currently marked as reserved on an ext2 or ext3 filesystem, run the following command;

dumpe2fs /dev/mapper/vg00-lv_home | grep -i "reserved block count"

That'll show you how many blocks are restricted. Multiply that by how big your actual blocks are, and you'll know what percentage of your filesystem is restricted to root.

Keep in mind, your block size can be set when you initially use mkfs.ext2 and mkfs.ext3 to create a filesystem, as can the "reserved block count".

To change the "Reserved Block Count" on an existing ext2 and ext3, run the following command;

tune2fs -m 1 /dev/mapper/vg00-lv_home

Then do a "df -h" and see if that straightens things out.
 
Old 10-20-2009, 03:30 AM   #4
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by rizhun View Post
Hi thomas2004ch,

Try the command:

Code:
$ du -shc /home
The glob might be causing you problems.
This doesn't help a lot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk space question! ntrudaglich Linux - Newbie 9 07-03-2007 05:26 AM
'df -h' showing wrong free space on disk? Cdzin Slackware 4 03-16-2006 01:35 PM
Disk Space Usage Question kaplan71 Linux - General 6 04-11-2005 02:22 PM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 03:58 PM


All times are GMT -5. The time now is 08:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration