LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A question about showing disk space (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-about-showing-disk-space-762311/)

thomas2004ch 10-16-2009 02:19 AM

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?

rizhun 10-16-2009 03:52 AM

Hi thomas2004ch,

Try the command:

Code:

$ du -shc /home
The glob might be causing you problems.

xeleema 10-16-2009 03:52 AM

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.

thomas2004ch 10-20-2009 03:30 AM

Quote:

Originally Posted by rizhun (Post 3721384)
Hi thomas2004ch,

Try the command:

Code:

$ du -shc /home
The glob might be causing you problems.

This doesn't help a lot.


All times are GMT -5. The time now is 09:06 PM.