LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-20-2005, 07:18 PM   #1
jeffUK
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Rep: Reputation: 0
No free Space even after deleting files (ext3)


Hi,
I'm running Mandrake 9.2 on a Mini ITX system.
I was having hardware probs. with hard-drive, so I bought a new one.
It has
hda1 / ext3 (6 gig)
hda5 swap (10 gig)
hda6 /home ext3 (110gig)
I copied the MBR & Partition table with dd & sfdisk.
I copied over the OS with partimage.
I made a new filesystem on hda6 with mkfs.ext3
I copied over the files from old HD hda5 to new one with rsync
So far so good.

I've filled up hda6, so I deleted files to make space.
Now the problem starts - even though "df" shows that I'm using less space,
the amount of free space stays at ZERO & I keep getting "No space left on device"
I've used tune2fs to check old hda6 and new hda6 - they show similar info.

If I use tune2fs to check how much free space I get "Free blocks: 59765" on the new one - this increases if I delete files, but still df gives me 0 free bytes!
I've run fschk on /dev/hda6 - that's clean.
I don't get the problem with hda1 or the old hda6

I've tried booting under a Knoppix Live CD (system rescue) - same effect.

Here's a typical output from df
Before delete:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part1
6040288 4942936 790516 87% /
/dev/ide/host0/bus0/target0/lun0/part6
108839616 108600556 0 100% /home
After delete:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part1
6040288 4942936 790516 87% /
/dev/ide/host0/bus0/target0/lun0/part6
108839616 107887000 0 100% /home

So now I've got a nice new (quiet!) HD, but I can't write to it!

Help would be gratefully received!

Jeff
 
Old 08-21-2005, 04:07 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
An ext filesystem stores an amount of “emergency” space that can only be written to by the root user; this manifests itself as a directory called /lost+found.

The exact amount of “emergency” space is set at the time of formating; I don't know if you can change it. This is done so that you have scratch space available to use if you need to take any drastic measures to reconstruct the drive, for example if fsck needs temporary space to fix a file.

I think you've probably filled this emergency space, and you will need to delete more files if you want to actually see any usable free space on the disk.
 
Old 08-21-2005, 04:20 AM   #3
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 764

Rep: Reputation: 32
Speaking from ignorance, you copied over the partition table from the old disc. It could be that as a result you have the same partition size.

Suggestion: I don't know what equivalent Linux tools there are but you could run Ranish Partition Manager to have a look. It runs under just about any DOS so you could make a FreeDOS boot diskette and then run Ranish. Note: Ranish display is confusing but the prog is very powerful and can handle Linux Partitions. That said, it is easy to destroy data so make sure you're backed up/
 
Old 08-21-2005, 04:55 AM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
fdisk will tell you what the partitions are. Gnuparted will let you resize partitions.
 
Old 08-21-2005, 09:58 AM   #5
eddiebaby1023
Member
 
Registered: May 2005
Posts: 378

Rep: Reputation: 33
Another way to "lose" space is from daemon programs that write big log files. You can remove the directory entry to the file, but the space won't be released until the program that's writing it terminates. Also, if you have other hard links to a file the space isn't released until the last link is deleted, ls -l will give you a link count for each file and directory.
 
Old 08-21-2005, 05:16 PM   #6
jeffUK
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Hi - thanks for your suggestions.
After seraching (again!) through the forums, I found this post
http://www.linuxquestions.org/questi...hreadid=122949
which helped to solve the problem.

The answer is to run (as root)
tune2fs -r 0 /dev/hda6
to set the reserved blocks to zero (as it was on my original partition).

Hope this helps others!

I can't see any advantage to having reserved blocks - if they're never used, they wont help reduce fragmentation.

Thanks again,

Jeff
 
Old 08-21-2005, 07:13 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,970

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
BTW. reserved space is intended to allow for the system to continue functioning even if a user fills up all the available space. i.e. If you accidentally filled up /, the system would crash the next time the OS attempted to write a log file. It also keeps the filesystem from filling up entirely which helps combat fragmentation.
 
  


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
Low disk space, problem deleting files gtzpower Linux - Software 1 05-24-2005 09:57 PM
no free space on / after deleting files wishbone42 Linux - General 3 11-21-2004 12:09 PM
HD space not going up after deleting files MikeZila Linux - Newbie 8 07-04-2004 09:04 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM
ext3 no free space even if there is m1-rail Linux - Software 2 04-20-2003 10:33 AM


All times are GMT -5. The time now is 01:26 PM.

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