All of lore.kernel.org
 help / color / mirror / Atom feed
* ext4 df free space reporting not reliable?
@ 2010-06-13  9:38 Andi Kleen
  2010-06-13 10:27 ` Theodore Tso
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2010-06-13  9:38 UTC (permalink / raw)
  To: linux-ext4


Hi,

I have a ext4 file system on 2.6.34 that shows 0 blocks available
in "df" (it's nearly full but never got a ENOSPC). 

But when I delete a couple of files it still shows 0 blocks.
And I can actually create small files without problem, so clearly
there is at least some space available.

So is df reporting not accurate?

Thanks,
-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ext4 df free space reporting not reliable?
  2010-06-13  9:38 ext4 df free space reporting not reliable? Andi Kleen
@ 2010-06-13 10:27 ` Theodore Tso
  2010-06-13 10:34   ` Andi Kleen
  0 siblings, 1 reply; 5+ messages in thread
From: Theodore Tso @ 2010-06-13 10:27 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-ext4


On Jun 13, 2010, at 5:38 AM, Andi Kleen wrote:

> Hi,
> 
> I have a ext4 file system on 2.6.34 that shows 0 blocks available
> in "df" (it's nearly full but never got a ENOSPC). 
> 
> But when I delete a couple of files it still shows 0 blocks.
> And I can actually create small files without problem, so clearly
> there is at least some space available.
> 
> So is df reporting not accurate?

Are you creating the files as root?  Sounds like the standard reserved
blocks behavior that's been around since ext3, ext2, BSD's ufs, etc...

- Ted


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ext4 df free space reporting not reliable?
  2010-06-13 10:27 ` Theodore Tso
@ 2010-06-13 10:34   ` Andi Kleen
  2010-06-13 16:45     ` Sandon Van Ness
  2010-06-13 18:58     ` tytso
  0 siblings, 2 replies; 5+ messages in thread
From: Andi Kleen @ 2010-06-13 10:34 UTC (permalink / raw)
  To: Theodore Tso; +Cc: Andi Kleen, linux-ext4

> Are you creating the files as root?  Sounds like the standard reserved
> blocks behavior that's been around since ext3, ext2, BSD's ufs, etc...

Yes everything is root.

I would expect root df to not report the reservation. Is that not the case?

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ext4 df free space reporting not reliable?
  2010-06-13 10:34   ` Andi Kleen
@ 2010-06-13 16:45     ` Sandon Van Ness
  2010-06-13 18:58     ` tytso
  1 sibling, 0 replies; 5+ messages in thread
From: Sandon Van Ness @ 2010-06-13 16:45 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Theodore Tso, linux-ext4

On 06/13/2010 03:34 AM, Andi Kleen wrote:
>> Are you creating the files as root?  Sounds like the standard reserved
>> blocks behavior that's been around since ext3, ext2, BSD's ufs, etc...
>>     
> Yes everything is root.
>
> I would expect root df to not report the reservation. Is that not the case?
>
> -Andi
>   

Is the root reserve (default 5% on ext3, not sure for ext3) set to 0?

tune2fs -m0 /dev/sdX

The file-system does not need to be unmounted to do this but this will
change the amount reported as available as once it hits 0 with the root
reserve only root can write to the FS.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ext4 df free space reporting not reliable?
  2010-06-13 10:34   ` Andi Kleen
  2010-06-13 16:45     ` Sandon Van Ness
@ 2010-06-13 18:58     ` tytso
  1 sibling, 0 replies; 5+ messages in thread
From: tytso @ 2010-06-13 18:58 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-ext4

On Sun, Jun 13, 2010 at 12:34:51PM +0200, Andi Kleen wrote:
> > Are you creating the files as root?  Sounds like the standard reserved
> > blocks behavior that's been around since ext3, ext2, BSD's ufs, etc...
> 
> Yes everything is root.
> 
> I would expect root df to not report the reservation. Is that not the case?

No, the reservation is always reported, regardless of which user ID is
executing the statfs(2) system call.  This has always been true, going
all the way back to BSD 4.3.

I could see the argument for doing this differently, but I could also
see that being very surprising for people to see different results
depending on whether they are running df from a setuid shell or not.
I'm not aware of any Unix system which has implemented the root-only
reservation system which has done this.

	    	    	   	     	  - Ted

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-13 18:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-13  9:38 ext4 df free space reporting not reliable? Andi Kleen
2010-06-13 10:27 ` Theodore Tso
2010-06-13 10:34   ` Andi Kleen
2010-06-13 16:45     ` Sandon Van Ness
2010-06-13 18:58     ` tytso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.