openSUSE Forums > Hardware » df mystery

Go Back   openSUSE Forums > Hardware
Forums FAQ Members List Search Today's Posts Mark Forums Read


Hardware Questions about drivers, peripheral cabling, configuration

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 30-Oct-2009, 18:00
Puzzled Penguin
 
Join Date: Aug 2008
Posts: 42
naimab hasn't been rated much yet
Default df mystery

Hello,

I was alarmed to discover that df reports 99% full on my biggest partition, but on closer inspection found that the numbers did not add up:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda7 445062208 416628196 5826144 99% /home

the difference between the total reported space and the reported used space is over 28Gb, but the available space is reported as just under 6Gb.

Is there any way I can discover what is wrong here, or should I enroll back in primary school and re-learn how to add?

Thanks,

Abe
Reply With Quote
  #2 (permalink)  
Old 30-Oct-2009, 22:13
Wise Penguin
 
Join Date: Jun 2008
Location: Kansas City Area, Missouri, USA
Posts: 2,203
lwfinger 's reputation is known to alllwfinger 's reputation is known to alllwfinger 's reputation is known to alllwfinger 's reputation is known to alllwfinger 's reputation is known to alllwfinger 's reputation is known to alllwfinger 's reputation is known to alllwfinger 's reputation is known to all
Default Re: df mystery

naimab wrote:
> Hello,
>
> I was alarmed to discover that df reports 99% full on my biggest
> partition, but on closer inspection found that the numbers did not add
> up:
>
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/sda7 445062208 416628196 5826144 99% /home
>
> the difference between the total reported space and the reported used
> space is over 28Gb, but the available space is reported as just under
> 6Gb.
>
> Is there any way I can discover what is wrong here, or should I enroll
> back in primary school and re-learn how to add?


No, your math is OK. When an ext3 partition is created using the
defaults, a certain percentage is reserved for use by root, which is
your 28 GB. Such reservation is to allow Linux to boot even if all the
user space is allocated, and is a safety measure.
Reply With Quote
  #3 (permalink)  
Old 31-Oct-2009, 05:49
hcvv's Avatar
Wise Penguin
 
Join Date: Jun 2008
Location: Netherlands
Posts: 1,898
hcvv 's reputation will be famous soon enoughhcvv 's reputation will be famous soon enoughhcvv 's reputation will be famous soon enough
Default Re: df mystery

Adding to the excelent expllanation of lwfinger, the default reserved space in ext2/3 is 5%. Now on todays very big file systems this can lead to a large amount (in your case more then 20GB). You can change this (live) using
Code:
tune2fs -m ...
see the man page of tune2fs. My opinion is not to put it to 0%, but some people might argue that that is not a problem on data only file systems (like containing a database) because boot does not use something there.
__________________
Henk van Velden
Reply With Quote
  #4 (permalink)  
Old 31-Oct-2009, 10:13
Puzzled Penguin
 
Join Date: Aug 2008
Posts: 42
naimab hasn't been rated much yet
Default Re: df mystery

Many thanks for both the explanation and the advice. It was a surprise to learn from you that even on a non-bootable partition so much space is reserved for root, but the good news is that apparently I can add numbers up

It is reasonable to assume that root will not need so much space, so I think I will reduce it to less than 1% - this is a data only partition after all.

Thanks again,

Abe
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2