LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 08-12-2005, 12:20 AM   #1
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Rep: Reputation: 121Reputation: 121
Ambiguity in free disk space in /home partition


I have a /home partition for my user files. It is a 1.9 GB partition and the free disk space in this partition currently shows only 542.9 MB.

Fine, I checked the size of my data files. I summed up all the space used by the subdirectories (including hidden folders) in my /home/hari partition. It shows 160 MB.

When I go one level down and check the total size of the /home/hari directory, it shows 1.4 GB used space.

I used konqueror's properties to check this. I also used KDiskFree and it still shows only 542.9 MB free.

How can I account for the large discrepancy when my total data stored sums up to only 160 MB? I even checked the hidden files and it just doesn't add up.

The partition in question is a reiserfs file system. I'm not storing anything else in the /home partition apart from this data totalling to 160 MB.

Any help regarding this would be much appreciated...

Last edited by vharishankar; 08-12-2005 at 12:21 AM.
 
Old 08-12-2005, 02:01 AM   #2
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
I found out the offending file.

It was the .xsession-errors file. Don't know how I missed that.

My question is

1. Why is this file so big?
2. Is it safe to delete this file?
 
Old 08-12-2005, 02:23 AM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Hi Hari,

You might want to check your partitions using "du -sh"
Code:
mingdao@james:~$ du -sh
23G     .
This gives you a summary of the disk usage of each FILE, recursively for directories. And the switches -- s is for summarize and h for human readable. There are many more options which might suit your needs more ... read "man du" to check.

I don't have an .xsession-errors file, or any other .xsession* files on this box. However, I run Fluxbox and not a desktop environment, which might be the reason. But on other boxen here running KDE, there were no .xsession* files, either. Perhaps it's only generated when there is an error.

Sorry I can't be of more help.
 
Old 08-12-2005, 02:28 AM   #4
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
Apparently it's an error log. I checked some of it (not all 1.2 GB of it!) Not a problem I would imagine to delete it.

Yes, I've been getting a lot of errors with startx. Especially the first time I boot the system, startx dumps an error. Then I run startx again, I get it working fine.

Last edited by vharishankar; 08-12-2005 at 02:30 AM.
 
Old 08-12-2005, 02:34 AM   #5
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
Well, I have that file on my rig, I run Gentoo and KDE BTW, and it is not that big.

Code:
-rw-------   1 dale users   95502 Aug 12 01:31 .xsession-errors
I would not delete it but I would clear the contents. I have done that on my emerge log before. It may recreate the file but what if it don't?

Now to go see what is in my file.

Later

 
Old 08-12-2005, 02:40 AM   #6
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
Well I deleted that file and the disk space still shows only 531 MB free.

Might be a reboot might fix this...
 
Old 08-12-2005, 02:56 AM   #7
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
REBOOT!!!!!!

That is for windoze, not Linux. You need to go wash your mouth out for saying that. LOL

I doubt that will fix it. That is strange and there is something there that is taking up the space. Maybe check and see what is mounted and where it is mounted. Maybe there is a typo in your fstab file.

Is strange though.

Later



Reboot, < gag gag gag > LOL
 
Old 08-12-2005, 02:58 AM   #8
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
Oh, empty your trash too. I know when I delete things in Konqueror as root, it puts them in the root trash can instead of the user that KDE is logged in as. Maybe your trash can is the hog. May want to check both.

Later

 
Old 08-12-2005, 03:02 AM   #9
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
No trashing didn't do it.

I did a thorough check of all files in the /home partition and the whole directory /home comes to about only 170 MB. The partition size is 1.9 GB and it still keeps showing only 535 MB free now.

I know it can't be swap (like sometimes happens in Windows). I really don't understand why this space is reported as in use...
 
Old 08-12-2005, 03:17 AM   #10
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
Did you check to see if anything else may be mounted in it by mistake? Just type in mount and it should list the partitions and where they are mounted. You can mount partitions twice or have them mounted in two places. I have done that before.

I have two users in my /home and it uses only about 720Mbs of space and I use reiserfs as well. I'm running out of ideas. We need a real guru.

 
Old 08-12-2005, 03:30 AM   #11
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
Mount gives me this
Quote:
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda6 on /home type reiserfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
I don't really see any problems here...
 
Old 08-12-2005, 03:43 AM   #12
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
Well, a reboot fixed it in any case now

Don't know why it required a reboot, but now it shows 1.7 GB free as it should...

Thanks for all the help.
 
Old 08-12-2005, 03:47 AM   #13
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
It likely deleted a file that you didn't see. I see mine "clear temp files" during the boot process too.

It was there somewhere. Just that we couldn't find it is all.

Later

 
Old 08-12-2005, 07:59 AM   #14
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
A couple of things:

1) df and du do their calculations slightly differently so won't give you exactly the same results but should be close enough most of the time so that likely wasn't your issue.

2) The most probable issue was that a file got deleted while it was still open by a process. When this occurs the file NAME gets deleted but not the file INODE. A reboot will always cure this because it kills all processes (including the one that held the file open).

However you don't have to reboot as pointed out above. Instead you can do "lsof /home" to see all open files and associated processes using /home. Typically in this situation you'd see a very large size file open but no name. If you kill the process associated with that it will free up the INODE and the deletion will complete.

lsof will show you things tha fuser often won't as far as what is busying out a filesystem. It has many other uses including examining open network connections and associating those with processes so is better than netstat in that regard.
 
Old 02-22-2013, 02:09 PM   #15
minty33
Member
 
Registered: Aug 2012
Location: earth
Distribution: Mint Xfce, Korora Gnome3, Ubuntu Server NoGui,
Posts: 136

Rep: Reputation: 1
Maye the reboot fixed it because it was a logfile and deleting it probably created a tmp backup that was being used till you shut down or its loaded in ram at the beginning of the session so until it left ram it was being used. Just guesses don't know for sure. But I do also think journaled fs's like reiserfs don't show all you unallocated space accurately because some is reserved for backups of recently deleted files. I don't know how the journal gets reported by df or du but keep that in mind. That's why shred is unreliable with journaled fs's. The percentage of yours is odd though but maybe because the partition is so small and the journal is based on mb's not percentage of drive space available. Again just a guess.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
No free space on disk, but there is? Recirqie Suse/Novell 4 02-22-2013 02:17 PM
How much disk space do I have free? Ian D Linux - General 5 10-27-2005 07:22 PM
Creat free space from /home partition, how? hraposo Mandriva 1 09-22-2004 01:09 PM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 11:19 PM
Free up disk space TheShemeta Slackware 5 11-26-2003 05:50 PM


All times are GMT -5. The time now is 12:42 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration