Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-15-2006, 12:02 PM
|
#1
|
Member
Registered: Jul 2003
Location: Campinas-SP, Brazil
Distribution: Slackware
Posts: 61
Rep:
|
'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 12:05 PM.
|
|
|
03-15-2006, 03:13 PM
|
#2
|
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687
Rep:
|
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 03:16 PM.
|
|
|
03-15-2006, 05:32 PM
|
#3
|
Member
Registered: Feb 2003
Location: Texas
Distribution: slackware 11
Posts: 90
Rep:
|
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 ?
|
|
|
03-15-2006, 05:56 PM
|
#4
|
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687
Rep:
|
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 05:58 PM.
|
|
1 members found this post helpful.
|
03-16-2006, 02:35 PM
|
#5
|
Member
Registered: Jul 2003
Location: Campinas-SP, Brazil
Distribution: Slackware
Posts: 61
Original Poster
Rep:
|
Thank you jomen and sn9ke_eyes. Those commands did the trick. I didn't know of that reserved space.
Bye
|
|
|
All times are GMT -5. The time now is 03:36 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|