LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 03-24-2005, 08:21 PM   #1
LancerNZ
Member
 
Registered: Oct 2004
Location: New Zealand
Distribution: Fedora Core 2
Posts: 42

Rep: Reputation: 15
No space left on device - even after rm large fiiles.


I've been having problems with my drive space reporting it's too full so I decided to delete some larger files... thinks like my (3 days on 56k) Knoppix.iso etc.

Now here's the thing. I can rm files alright 9they disappear on the next ls) but they don't seem to make any difference to the drive thinking it's too full.

Currently, running a df command:
Code:
[lancer@localhost tmp]$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2             37852728  36409712         0 100% /
/dev/hda1                99043     40359     53570  43% /boot
none                    127800         0    127800   0% /dev/shm
none                    127800         0    127800   0% /var/lib/jack/tmp
/dev/fd0                  1424         2      1422   1% /mnt/floppy
(note: the floppy is mounted here so I could have something to dump the above output to... I have no idea what /var/lib/jack/tmp is about and wondered if I'd been "cracked" until a google informed me it has something to do with sound).

Here's a copy of other supposedly relevant files:
/etc/fstab
Code:
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/hda3               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0
none                    /var/lib/jack/tmp       tmpfs   defaults         0 0
/etc/mstab
Code:
/dev/hda2 / ext3 rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda1 /boot ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
none /var/lib/jack/tmp tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/dev/fd0 /mnt/floppy vfat rw,nosuid,nodev,user=lancer 0 0
Why has it gone wrong? Help! It's not even booting into X anymore now. I though it might be gnome/kde going belly up and decided to try switchdesk fluxbox but it won't let me write to Xorg.conf because of device full errors. I can't even mkdir (unless I am root - which I find strange).

By all appearances, there seems to be an error with the accounting of the file system. Files do get deleted, but the space they take up does not get unregistered.

I'm using Fedora Core2 updated with Synaptic and on kernel 2.6.10-2.1.ll.rhfc2.ccrma
 
Old 03-24-2005, 08:54 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,748

Rep: Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927Reputation: 5927
By default when an ext3 filesystem is formated 5% is reserved for root's use. This allows root to login in case the filesystem becomes full and keep the fragmentation down. You still need to delete some additional files to get the filesystem below 95%.

On large drives 5% can add up to a lot of space. You can reduce the amount of reserved space using the tune2fs command but do not reduce it to zero because if you fill it up again then even root might not be able to log back in.
 
Old 03-24-2005, 09:15 PM   #3
Renegade498
LQ Newbie
 
Registered: Mar 2004
Distribution: Debian
Posts: 13

Rep: Reputation: 0
I experienced this EXACT problem a few weeks ago. When I did a "df", it showed that there was 0% disk space available where my root was mounted. So, I started to remove a lot of unnecessary programs that took up a lot of space. I probably didn't delete enough, but "df" continually reported that there was 0% disk space left.

Right now, this is what my "df" shows:

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2             4.7G  2.0G  2.6G  44% /
tmpfs                 444M     0  444M   0% /dev/shm
/dev/hda4             5.1G  254M  4.6G   6% /home
Before, /dev/hda2 had a much smaller maximum size and /dev/hda4 had a much larger maximum size. So I backed up my /home (which is mounted on /dev/hda4), and loaded up a bootable PartitionMagic (any partitioning program will do), and deleted the /dev/hda4 partition. With the extra chunk of space I now had, I gave some to the already existing /dev/hda2, and made a new /dev/hda4, which was slightly smaller than the previous.

I am not sure if this is the only solution, but it does tell you one thing: You will eventually run out of space, even if you delete some files now. The best thing to do is to get a bigger hard drive.
 
Old 03-24-2005, 09:19 PM   #4
LancerNZ
Member
 
Registered: Oct 2004
Location: New Zealand
Distribution: Fedora Core 2
Posts: 42

Original Poster
Rep: Reputation: 15
But I'm not sure this is the case. If I calculate the "used" from the "total" space I get 1443016 bytes, which should surely be useful enough to allow me user-drive access. I've deleted 700Mb iso files already and it's still at 0% Available.

I'll try deleting a few more though and let you know if that works.

I'm wondering about using tomsrtbt or knoppix or even the Fedora Sysrescue CD and trying a e2fsck /dev/hda but I'm holding out on that until I feel I have really run out of other options.
 
Old 03-24-2005, 09:53 PM   #5
LancerNZ
Member
 
Registered: Oct 2004
Location: New Zealand
Distribution: Fedora Core 2
Posts: 42

Original Poster
Rep: Reputation: 15
Okay - I've finally got it up. Like you said - delete more files. I was surprised by the amount I had to delete just to get operation again (!!!) Currently...

Code:
[lancer@localhost lancer]$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2             37852728  32899844   3030076  92% /
/dev/hda1                99043     40359     53570  43% /boot
none                    127800         0    127800   0% /dev/shm
none                    127800         0    127800   0% /var/lib/jack/tmp
[lancer@localhost lancer]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2              37G   32G  2.9G  92% /
/dev/hda1              97M   40M   53M  43% /boot
none                  125M     0  125M   0% /dev/shm
none                  125M     0  125M   0% /var/lib/jack/tmp
.....2.9Gb seems a LOT of space to be "just within operation again" to someone who was brought up on a ZX81 with 1Kb RAM memory and tapes.

Still - my job now to do the housework. Thanks both for your help.

Oddly enough, this morning I was looking at possible ways of making a pie graph to show space of files / dirs in any directory. It would be a bit like...
du -h --max-depth 1 .
...but would show as a pie graph. Something like this: http://www.softwhile.com/product_dsp.html

Is there a way of scripting du and something like gnuplot to do the same? It would speed up the housekeeping of dirs with LONG lists of files.
 
Old 03-24-2005, 10:11 PM   #6
Renegade498
LQ Newbie
 
Registered: Mar 2004
Distribution: Debian
Posts: 13

Rep: Reputation: 0
Glad you got the problem fixed. Turns out you were much more patient than I was. I gave up after deleting about 10-12 files.
 
Old 03-24-2005, 10:49 PM   #7
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
For graphing, how about this: Filelight

EDIT:
bleh... No screenshots for it on their page. Should have linked to the freshmeat.net project... it has a nice shot of it. It's for KDE though...

Another (less pretty) option is a bar graph that you can find here

Last edited by Dark_Helmet; 03-24-2005 at 10:54 PM.
 
Old 03-25-2005, 12:47 AM   #8
LancerNZ
Member
 
Registered: Oct 2004
Location: New Zealand
Distribution: Fedora Core 2
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks! That's saved me a lot of trying to put something together. The KDE one is excellent, even allowing to delete from the program itself!
 
Old 05-08-2006, 01:01 AM   #9
atifsami
LQ Newbie
 
Registered: May 2006
Posts: 4

Rep: Reputation: 0
well i had the same problem....my case was lil bit diff...from urs..(i use a hdb and hdd for backups)......but i think it will work there too.....i faced the same 100%Usage issue...so i shared it via samba and had look at it from my windows...and saw a hidden folder of ".Trash-root" in which all of the files were present which i deleted earlier...so i went into the same directory of .Trash-root and rm -drf *....and it worked....
 
Old 05-09-2006, 04:55 AM   #10
atifsami
LQ Newbie
 
Registered: May 2006
Posts: 4

Rep: Reputation: 0
well found it.........it is a hidden folder in root with name of .Trash.....
/root/.Trash
rm -drf * u get the space.....
 
  


Reply



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
cp: No space left on device, but df does not agree! Correador Linux - General 5 04-18-2011 08:26 AM
no space left on device, but it has enough!!! help!!! sarah21 Red Hat 3 02-03-2005 08:37 PM
No space left on device xfgao Red Hat 27 01-13-2005 04:06 PM
No space left on the device ashwinipahuja Programming 1 06-24-2004 12:05 AM
glibc compile no space left on device curtdodds Linux From Scratch 5 07-23-2003 12:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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