LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-15-2006, 11:02 AM   #1
Cdzin
Member
 
Registered: Jul 2003
Location: Campinas-SP, Brazil
Distribution: Slackware
Posts: 61

Rep: Reputation: 15
'df -h' showing wrong free space on disk?


Hi all! Recently I've downloaded the new X.org source and right after that, even after installing and removing the source directory, the 'df' commmand has been confusing me about the amount of free space I have left on my disk. The output of it:

Filesystem Size Used Avail Use% Mounted on
/dev/hdb2 5.7G 5.1G 250M 96% /

Shouldn't I have like 600M available? Is there any distinction between non-used and available space? If so, then how can I make all my non-used space available?

Regards

Last edited by Cdzin; 03-15-2006 at 11:05 AM.
 
Old 03-15-2006, 02:13 PM   #2
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Rep: Reputation: 54
Is your filesystem ext2 or ext3 ?
If yes - when you created it with the default options,like:
mkfs.ext3 -j /dev/hdaX
it reserves 5% of the space solely for the super-user aka: root - and consequently does not show this space in "df" even if it is there - but just for "root" to be able to log in and do maintanance even if somehow the filesysten got completely full.
Today, with the help of a live-cd this is easy to do from "outside" - so, for a pretty much "single user" desktop-system there is no need to reserve that much space just in case.
mkfs.ext3 -j -m 0 /dev/hdX
will set the amount of reserved space to 0 for example - that is what I have done on my system

Last edited by jomen; 03-15-2006 at 02:16 PM.
 
Old 03-15-2006, 04:32 PM   #3
sn9ke_eyes
Member
 
Registered: Feb 2003
Location: Texas
Distribution: slackware 11
Posts: 90

Rep: Reputation: 15
Quote:
Originally Posted by jomen
Is your filesystem ext2 or ext3 ?
If yes - when you created it with the default options,like:
mkfs.ext3 -j /dev/hdaX
it reserves 5% of the space solely for the super-user aka: root - and consequently does not show this space in "df" even if it is there - but just for "root" to be able to log in and do maintanance even if somehow the filesysten got completely full.
Today, with the help of a live-cd this is easy to do from "outside" - so, for a pretty much "single user" desktop-system there is no need to reserve that much space just in case.
mkfs.ext3 -j -m 0 /dev/hdX
will set the amount of reserved space to 0 for example - that is what I have done on my system
Good info. But that would be when he is creating the filesystem right ? Since his filesystem is already created and in place, is there any way to adjust without losing/corrupting data ?
 
Old 03-15-2006, 04:56 PM   #4
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Rep: Reputation: 54
Only from "outside" - a live-cd like knoppix or the install cd...
the filesystem in question needs to be NOT mounted...
He could run:
tune2fs -m 0 -o journal_data -O dir_index,sparse_super /dev/hdaX
followed by:
fsck.ext3 -f -D /dev/hdaX
...to re-index the filesystem - to optimize the filesystem to use the hashed b-trees option of ext3 / ext2 - which is faster than the default.

Last edited by jomen; 03-15-2006 at 04:58 PM.
 
Old 03-16-2006, 01:35 PM   #5
Cdzin
Member
 
Registered: Jul 2003
Location: Campinas-SP, Brazil
Distribution: Slackware
Posts: 61

Original Poster
Rep: Reputation: 15
Thank you jomen and sn9ke_eyes. Those commands did the trick. I didn't know of that reserved space.

Bye
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 01:17 PM
How t get it known free disk space? ukrainet Linux - General 3 05-06-2008 10:52 PM
Wrong calculation of free disk space by kdiskfree AGazzaz Mandriva 2 02-09-2006 06:25 AM
External drive - wrong size af free space yannator Linux - General 2 06-27-2005 02:05 AM
Samba: Windows reports wrong free space avantman42 Linux - Networking 2 11-17-2003 09:48 AM


All times are GMT -5. The time now is 11:05 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