LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-09-2011, 06:22 PM   #1
green_dood
Member
 
Registered: Nov 2007
Location: Puebla, Mexico
Distribution: Ubuntu, DSL, Fedora
Posts: 45
Blog Entries: 1

Rep: Reputation: 15
Exclamation Xorg not closing files?? System reporting full hard disk!!


Hi. I opened this thread in Ubuntu forums with no luck at all. Hope someone can give me a clue of what happens.

http://ubuntuforums.org/showthread.php?t=1683746

Recently, gnome has been warning me about low disk space, always less than 1.5GiGs.

The problem is, baobab (disk usage analyzer) tells me that there are something like 50GiG free. I am sure that I have the free space ( I can write big files ) but the system keeps reporting low disk space. Even
Code:
df -h
looks wrong:


Code:
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext4    221G  209G  638M 100% /
none      devtmpfs    2.0G  272K  2.0G   1% /dev
none         tmpfs    2.0G  1.9M  2.0G   1% /dev/shm
none         tmpfs    2.0G  328K  2.0G   1% /var/run
none         tmpfs    2.0G     0  2.0G   0% /var/lock
none       debugfs    221G  209G  638M 100% /var/lib/ureadahead/debugfs
Wandering in some other thread, someone pointed out that some program may be deleting files ... but not closing them, and the offending program can be fount with
Code:
sudo lsof -s | grep DEL | sort -rnk 7,7
,which gives a wall of results like these
Code:
Xorg      1334                root  DEL       REG                0,4                 8573 /drm mm object
Xorg      1334                root  DEL       REG                0,4                 8572 /drm mm object
Xorg      1334                root  DEL       REG               0,4                 8560 /drm mm object
Xorg      1334                root  DEL       REG                0,4                 8559 /drm mm object
Xorg      1334                root  DEL       REG                0,4                 8558 /drm mm object
Xorg      1334                root  DEL       REG                0,4                 8557 /drm mm object
Xorg      1334                root  DEL       REG                0,4                 8556 /drm mm object
Perhaps Xorg is having a very bad behavior?? What can I do to force it close the files , or whatever else that can give me back the hard disk space ... working is unpractical since most applications (gnome apps) think that there is no space left on the device.


My sistem is Ubuntu 10.10 64bit, with all the upgrades until today (proposed updates enabled)
XORG INFO


X.Org X Server 1.9.0
Release Date: 2010-08-20
X Protocol Version 11, Revision 0


Thanks in advance.
 
Old 02-09-2011, 09:16 PM   #2
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 7,731

Rep: Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459
I ran into a problem where the amount of free space was a lot less than it should have been on my Debian box.

I installed kdirstat (it's in the Ubunutu repos) and used it to look at the drive usage; it displays nice pie graphs of usage of the selected directories.

In my case, /var/logs was out of hand, so I re-looked at how logrotate was being implemented and reconfigured it. It doesn't sound as if that is likely to be your situation, but kdirstats is a handy diagnostic tool.

Looking at it may help you figure out where in the problem is.
 
Old 02-09-2011, 10:10 PM   #3
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,150

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
According to man lsof, those are all regular files (REG) that have been deleted (DEL). That is, the space used by those files has been labeled as being available for other uses, but not yet used. Remember, most Linux file systems (such as the default ext4 file system used by Ubuntu) avoid the problem of file fragmentation by trying very hard to only write a file to a disk area where the whole file can fit. When a file is "deleted," its INODE list is added to the available pool, but not actually used 'till it's needed. When you see a DEL in the lsof listing for a REG file, it's just telling you that that file's space is available for use, and not counted in the used space in the file system.

In the list you posted, those files were used by the X-server for display windows that have been closed. The space will be reused when the server opens a new window.

Note that those files are all 8K bytes in size, so their total is not of any significance on your size of disk.

If you're concerned about what's eating your drive, look at the find command. For example:
Code:
$ sudo find / -size +50M
[sudo] password for Peter: 
/proc/kcore
find: `/proc/21908': No such file or directory
find: `/proc/21912/task/21912/fd/6': No such file or directory
find: `/proc/21912/task/21912/fdinfo/6': No such file or directory
find: `/proc/21912/fd/6': No such file or directory
find: `/proc/21912/fdinfo/6': No such file or directory
/usr/share/icons/gnome/icon-theme.cache
/usr/share/icons/oxygen/icon-theme.cache
/usr/share/icons/hicolor/icon-theme.cache
/usr/share/ibus-pinyin/db/open-phrase.db
/usr/lib/debug/usr/libexec/gcc/x86_64-redhat-linux/4.5.1/cc1objplus.debug
/usr/lib/debug/usr/libexec/gcc/x86_64-redhat-linux/4.5.1/cc1plus.debug
/usr/lib/debug/usr/lib64/libQtScript.so.4.7.1.debug
[many more lines...]
finds all files in my file system that are no smaller than 50 megabytes. (As you can see at the start of the output, since "everything is a file" in UNIX-like system, system memory (/proc/kcore) is listed. If you don't want that, find has a -type option that would restrict it to regular files. See man find or info find) for more details.

Last edited by PTrenholme; 02-09-2011 at 10:18 PM. Reason: typo
 
Old 02-10-2011, 05:11 AM   #4
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: *buntu, Vector
Posts: 499

Rep: Reputation: 102Reputation: 102
If you want a graphical approach, try running baobab as root. Your normal user might not see all files. (Though I'm not sure what might be taking the space that your normal user can't see...)
 
Old 02-10-2011, 12:11 PM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,150

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Thanks cantab! I'd forgotten about baobab.
 
  


Reply

Tags
disk usage, fopen, xorg


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
my hard disk is suddenly full ????? Linux Fan Linux - Newbie 7 09-24-2008 08:20 AM
mounting linux files from another hard disk(IDE) to current hard disk(sata) the lord protector Linux - Hardware 5 05-04-2008 11:30 AM
hard disk is full because of what ? bendani Linux From Scratch 6 02-27-2007 02:11 PM
/proc filesystem has too many 2gb files hard disk getting full sadun Suse/Novell 5 09-16-2005 07:40 AM
help! full hard disk! huffboy Slackware 4 10-11-2003 01:07 AM


All times are GMT -5. The time now is 05:39 AM.

Main Menu
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