LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 12-05-2003, 09:01 AM   #1
Zamolxis
LQ Newbie
 
Registered: Dec 2003
Location: Bucharest, Romania
Distribution: Gentoo
Posts: 24

Rep: Reputation: 15
Df reports zero bytes free


Df reports zero bytes free on my /dev/hda6. This is a 35 G ext3 partition which was almost full until yesterday. At one moment I moved something onto it from another partition. And after that df started reporting 0 bytes free. And no matter what I delete from it, there are still 0 bytes free. And the worst is that I can put things onto it without getting "out of space" error. I mention that I ran fsck and it didn't gave any errors. Weird, huh? Does anyone have any idea of what could be wrong? Thank you.
 
Old 12-05-2003, 09:31 AM   #2
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
Could you perhaps be putting things on as root, and as such be using the usually by default 5% reserved blocks?
 
Old 12-05-2003, 10:51 AM   #3
Zamolxis
LQ Newbie
 
Registered: Dec 2003
Location: Bucharest, Romania
Distribution: Gentoo
Posts: 24

Original Poster
Rep: Reputation: 15
Yes I am root, but I didn't know anything about the 5% reserved space. Should I understand that df does not report that space? Let me check.
 
Old 12-05-2003, 11:01 AM   #4
Zamolxis
LQ Newbie
 
Registered: Dec 2003
Location: Bucharest, Romania
Distribution: Gentoo
Posts: 24

Original Poster
Rep: Reputation: 15
Yes. You were right. Moving some large video files out out of the partition solved the problem. Thank you. However, my logic does not see the reason for which df run as root doesn't report the free space including the reserved 5%.

Last edited by Zamolxis; 12-05-2003 at 11:03 AM.
 
Old 12-09-2003, 08:22 AM   #5
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
The logic of keeping the reserved 5% secret is so that the standard user does not take the unavailable (reserved) space into consideration. You can see the total space with tune2fs (run as root). For example:

# df /tmp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdd1 404727 369777 18244 96% /tmp
# tune2fs -l /dev/sdd1
tune2fs 1.32 (09-Nov-2002)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 6c114425-117e-4026-90df-4068ac4b7212
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal filetype needs_recovery sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 102408
Block count: 417658
Reserved block count: 16706
Free blocks: 34950
Free inodes: 97512
First block: 1
Block size: 1024
Fragment size: 1024
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 2008
Inode blocks per group: 251
Last mount time: Tue Dec 9 05:03:43 2003
Last write time: Tue Dec 9 05:03:43 2003
Mount count: 13
Maximum mount count: 29
Last checked: Sat Nov 29 05:23:33 2003
Check interval: 15552000 (6 months)
Next check after: Thu May 27 06:23:33 2004
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal UUID: <none>
Journal inode: 81
Journal device: 0x0000
First orphan inode: 19

Note that tune2fs reports 417658 blocks with 34950 free blocks of which 16706 are reserved. 34950 - 16706 = 18244 which is the amount free reported by df.

Note also that 417658 - 16706 = 400952, which happens to be less than the total blocks reported by df (404727 blocks). I am not sure where the difference (3775 blocks) is. I have to admit that I was expecting them to match. I suspect it lies either in the superblocks or the ext3 journal, and could be resolved by the used space reported by df in an empty filesystem after creation. THAT is just a guess, but hopefully this clarifies things just a bit and gives you another CLI tool for your kit.
 
Old 12-09-2003, 10:33 AM   #6
Zamolxis
LQ Newbie
 
Registered: Dec 2003
Location: Bucharest, Romania
Distribution: Gentoo
Posts: 24

Original Poster
Rep: Reputation: 15
. Thank you. I solved the problem in a more radical way, by writing a couple CDs. Now I've got some space. But tune2fs looks like a interesting tool. I shall study it further.
 
Old 12-15-2003, 03:20 PM   #7
Zamolxis
LQ Newbie
 
Registered: Dec 2003
Location: Bucharest, Romania
Distribution: Gentoo
Posts: 24

Original Poster
Rep: Reputation: 15
tune2fs -r 0 /dev/hda6 set the reserved space to 0. Now it's as it should be for root.
 
  


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
TX bytes vs. httpd bytes ovrload Linux - Networking 3 10-12-2005 04:19 PM
[C++] bytes streams Ossar Programming 1 06-17-2005 02:56 PM
Samba: 70 Gb free space, samba reports no space left? HansLuijten Linux - Networking 1 08-18-2004 04:40 PM
Samba: Windows reports wrong free space avantman42 Linux - Networking 2 11-17-2003 09:48 AM
Free, free,FREE=? no money, = Freedom? murshed Linux - Newbie 8 01-20-2003 07:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration