LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-28-2011, 09:33 AM   #1
guna_pmk
Member
 
Registered: Sep 2008
Posts: 220

Rep: Reputation: 5
Disk space df du quota


Hi all,

Some time ago I posted this thread:

http://www.linuxquestions.org/questi...g-20-a-875154/

Now I have similar weird problem. See below:
Code:
2.8M	/home/user/file_folder_1
8.0M	/home/user/file_folder_2
4.0K	/home/user/file_folder_3
3.7M	/home/user/file_folder_4
64K	/home/user/file_folder_5
50M	/home/user/file_folder_6
988K	/home/user/file_folder_7
204K	/home/user/file_folder_8
520K	/home/user/file_folder_9
98M	/home/user/file_folder_10
12K	/home/user/file_folder_11
1.7M	/home/user/file_folder_12
25M	/home/user/file_folder_13
12K	/home/user/file_folder_14
32K	/home/user/file_folder_15
3.4M	/home/user/file_folder_16
4.0K	/home/user/file_folder_17
8.0K	/home/user/file_folder_18
3.2M	/home/user/file_folder_19
1.4M	/home/user/file_folder_20
244K	/home/user/file_folder_21
8.0K	/home/user/file_folder_22
12K	/home/user/file_folder_23
1020K	/home/user/file_folder_24
144K	/home/user/file_folder_25
812K	/home/user/file_folder_26
4.0K	/home/user/file_folder_27
84K	/home/user/file_folder_28
44K	/home/user/file_folder_29
48K	/home/user/file_folder_30
2.0M	/home/user/file_folder_31
68K	/home/user/file_folder_32
69M	/home/user/file_folder_33
8.0K	/home/user/file_folder_34
12K	/home/user/file_folder_35
16K	/home/user/file_folder_36
244K	/home/user/file_folder_37
16K	/home/user/file_folder_38
4.0K	/home/user/file_folder_39
8.0K	/home/user/file_folder_40
4.0K	/home/user/file_folder_41
4.0M	/home/user/file_folder_42
8.0K	/home/user/file_folder_43
2.7M	/home/user/file_folder_44
177M	/home/user/file_folder_45
208K	/home/user/file_folder_46
16K	/home/user/file_folder_47
12K	/home/user/file_folder_48
48K	/home/user/file_folder_49
12K	/home/user/file_folder_50
76K	/home/user/file_folder_51
8.0K	/home/user/file_folder_52
36K	/home/user/file_folder_53
36K	/home/user/file_folder_54
28K	/home/user/file_folder_55
468K	/home/user/file_folder_56
4.0K	/home/user/file_folder_57
28K	/home/user/file_folder_58
540K	/home/user/file_folder_59
8.0K	/home/user/file_folder_60
224K	/home/user/file_folder_61
12K	/home/user/file_folder_62
344M	/home/user/file_folder_63
1.2M	/home/user/file_folder_64
1.9M	/home/user/file_folder_65
752K	/home/user/file_folder_66
16K	/home/user/file_folder_67
60K	/home/user/file_folder_68
304K	/home/user/file_folder_69
388K	/home/user/file_folder_70
2.5G	/home/user/


This is the result of du -h --max-depth /home/user/

What is weird here is that the total size it shows for /home/user is 2.5G. But the sum of all the files and folders ie the sum of sizes of the first columns of all the rows except the last row is only 800M. Where is the other 1+G space gone?

I have checked by issuing lsof +L1 for uncleared inodes. But none of the file in /home/user is found in that. My problem is I have only 2.5G quota for the user which now prevents me doing anything in the account.

Can anybody please point me to the right direction?

Thanks
 
Old 10-28-2011, 09:42 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Maybe in some hidden directory? What is the exact du command you used to retrieve the list above?
 
Old 10-28-2011, 10:18 AM   #3
guna_pmk
Member
 
Registered: Sep 2008
Posts: 220

Original Poster
Rep: Reputation: 5
Thanks colucix,

du -h --max-depth /home/user/

is the exact command I used to get the size. This showed me all the '.' files as well.I hope by default du includes hidden file as well.

Please let me know if you need more info in this regard.

Thanks
 
Old 10-28-2011, 10:41 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
The --max-depth option requires an argument. Indeed if I run
Code:
$ du -h --max-depth /home/colucix
du: invalid maximum depth `/home/colucix'
Try `du --help' for more information.
I got the error above. Anyway, your command already takes care of hidden directories. But the output of du doesn't list the files inside /home/user (by default it lists only directories). Maybe have you got some large file inside /home/user?

To take care of the files under the top level directory you need the -a option:
Code:
du -h -a --max-depth=1 /home/user
 
Old 10-28-2011, 11:23 AM   #5
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
I also think --max-depth needs a number.

Try running it as root ... you may have files not owned by you.

When analysing free space, I always include -x to avoid including any symlinks/mounts to other file systems.

The -a parameter makes no difference on my system.
 
Old 10-29-2011, 09:44 AM   #6
guna_pmk
Member
 
Registered: Sep 2008
Posts: 220

Original Poster
Rep: Reputation: 5
Sorry for the confusion guys. Actually I originally ran the command with the --max-depth=1 (you are right, it would err had it been run without the value).

I tried both as the user who owns the directory and as the root user. I get the same results in both the cases.

I just tried with -a option as well. It is still the same ie 1.3G when I sum up the first columns but getting a 2.5G as the dir size as reported by the du.

Sorry for the confusion guys.

Thanks
 
Old 10-29-2011, 10:47 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Please, can you post the output of the following?
Code:
find /home/user -printf "%k\n" | awk '{sum+=$1}END{print sum}'
Also it would be useful to see the output of
Code:
ls -al /home/user
so that I can think about some other more targeted tests to discover the reason of the culprit.
 
Old 10-30-2011, 03:46 PM   #8
guna_pmk
Member
 
Registered: Sep 2008
Posts: 220

Original Poster
Rep: Reputation: 5
Hi Guys,

If not the Friday evening to blame, it is stupid and greedy myself.

1. I did not issue 'du' command with the '-a' option which missed out the files under the /home/user/ directory.
2. Even after SecretCode pointed this out, I calculated the disk size with the same spreadsheet which contained a buggy formula which missed out files with Gig sizes.

After colucix's post, I issued the 'ls -al' with an additional 'h' from which I accidentally noticed the offensive .xsession-errors and .xsession-errors.old files of which the xsession-errors.old file was 1.3G.

Though the original issue is solved, why the .xsession-errors.old is 1.3G? Shall I just delete this file? I am using this home directory on CentOS 5.x and Fedora 14 & 15.

Thanks for your time and support guys.
 
Old 10-30-2011, 06:19 PM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by guna_pmk View Post
Though the original issue is solved, why the .xsession-errors.old is 1.3G? Shall I just delete this file? I am using this home directory on CentOS 5.x and Fedora 14 & 15.
Considering it is a text file, 1.3G is a very huge size! Maybe you have an error which repeats multiple times in a minute. You can delete it without problems, but your system will create it again if you don't address the issue. You can try to open it with vi or
Code:
tail -300 .xsession-errors
to see what is the repeating error message. Then, feel free to open a new thread to give this new issue more visibility. Cheers!
 
Old 10-31-2011, 04:52 AM   #10
guna_pmk
Member
 
Registered: Sep 2008
Posts: 220

Original Poster
Rep: Reputation: 5
Hi Guys,

The culprit was google-chrome. It kept writing to the xsession-errors file madly. It filled more than a gig disk space within an hour. I don't have time to get to the bottom of this chrome issue; but stopped using chrome and started using firefox.

Thanks for your help guys.
 
  


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
How To Create Disk Space Quota JustinK101 Linux - Server 2 05-26-2010 01:28 AM
Cedega "Disk space required for the installation exceeds available disk space" Solved Spewdemon LinuxQuestions.org Member Success Stories 1 10-18-2007 06:19 PM
How to assign disk quota(disk space limited) to user and group. hocheetiong Linux - Newbie 1 08-24-2007 04:20 AM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 03:58 PM
Where can I find a simple tutorial on quota (limit capacity of disk space of a user)? George2 Linux - Software 5 11-04-2003 08:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:51 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
Open Source Consulting | Domain Registration