linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Total fs size does not match with the actual size of the setup
@ 2013-10-27 20:09 Lester B
  2013-10-27 20:17 ` Hugo Mills
  0 siblings, 1 reply; 5+ messages in thread
From: Lester B @ 2013-10-27 20:09 UTC (permalink / raw)
  To: linux-btrfs

The btrfs setup only have one device of size 7 GiB but
when I run df, the total size shown is 15 GiB. Running
btrfs --repair displays an error "cache and super
generation don't match, space cache will be invalidated."

How can I correct the total fs size as shown in df?

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

* Re: Total fs size does not match with the actual size of the setup
  2013-10-27 20:09 Total fs size does not match with the actual size of the setup Lester B
@ 2013-10-27 20:17 ` Hugo Mills
  2013-10-27 20:27   ` Lester B
  0 siblings, 1 reply; 5+ messages in thread
From: Hugo Mills @ 2013-10-27 20:17 UTC (permalink / raw)
  To: Lester B; +Cc: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]

On Mon, Oct 28, 2013 at 04:09:18AM +0800, Lester B wrote:
> The btrfs setup only have one device of size 7 GiB but
> when I run df, the total size shown is 15 GiB. Running
> btrfs --repair

   I'd recommend not running btrfs check --repair unless you really
know what you're doing, or you've checked with someone knowledgable
and they say you should try it. On a non-broken filesystem (as here),
it's probably OK, though.

> displays an error "cache and super
> generation don't match, space cache will be invalidated."

   This is harmless.

> How can I correct the total fs size as shown in df?

   You can't. It's an artefact of the fact that you've got a RAID-1
(or RAID-10, or --mixed and DUP) filesystem, and that the standard
kernel interface for df doesn't allow us to report the correct figures
-- see [1] (and the subsequent entry as well) for a more detailed
description.

   Hugo.

[1] https://btrfs.wiki.kernel.org/index.php/FAQ#Why_does_df_show_incorrect_free_space_for_my_RAID_volume.3F

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
         --- Nothing right in my left brain. Nothing left in ---         
                             my right brain.                             

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: Total fs size does not match with the actual size of the setup
  2013-10-27 20:17 ` Hugo Mills
@ 2013-10-27 20:27   ` Lester B
  2013-10-27 21:34     ` Brendan Hide
  0 siblings, 1 reply; 5+ messages in thread
From: Lester B @ 2013-10-27 20:27 UTC (permalink / raw)
  To: Hugo Mills, Lester B, linux-btrfs

2013/10/28 Hugo Mills <hugo@carfax.org.uk>:
> On Mon, Oct 28, 2013 at 04:09:18AM +0800, Lester B wrote:
>> The btrfs setup only have one device of size 7 GiB but
>> when I run df, the total size shown is 15 GiB. Running
>> btrfs --repair
>
>    I'd recommend not running btrfs check --repair unless you really
> know what you're doing, or you've checked with someone knowledgable
> and they say you should try it. On a non-broken filesystem (as here),
> it's probably OK, though.
>
>> displays an error "cache and super
>> generation don't match, space cache will be invalidated."
>
>    This is harmless.
>
>> How can I correct the total fs size as shown in df?
>
>    You can't. It's an artefact of the fact that you've got a RAID-1
> (or RAID-10, or --mixed and DUP) filesystem, and that the standard
> kernel interface for df doesn't allow us to report the correct figures
> -- see [1] (and the subsequent entry as well) for a more detailed
> description.
>
>    Hugo.
>
> [1] https://btrfs.wiki.kernel.org/index.php/FAQ#Why_does_df_show_incorrect_free_space_for_my_RAID_volume.3F
>
> --
> === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
>   PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
>          --- Nothing right in my left brain. Nothing left in ---
>                              my right brain.


But my setup is a simple one without any RAID levels or other things so at least
df size column should show the actual size of my setup.

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

* Re: Total fs size does not match with the actual size of the setup
  2013-10-27 20:27   ` Lester B
@ 2013-10-27 21:34     ` Brendan Hide
  2013-10-27 21:49       ` Lester B
  0 siblings, 1 reply; 5+ messages in thread
From: Brendan Hide @ 2013-10-27 21:34 UTC (permalink / raw)
  To: Lester B, linux-btrfs; +Cc: Hugo Mills

On 2013/10/27 10:27 PM, Lester B wrote:
> 2013/10/28 Hugo Mills <hugo@carfax.org.uk>:
>> On Mon, Oct 28, 2013 at 04:09:18AM +0800, Lester B wrote:
>>> The btrfs setup only have one device of size 7 GiB but
>>> when I run df, the total size shown is 15 GiB. Running
>>> btrfs --repair
>>     I'd recommend not running btrfs check --repair unless you really
>> know what you're doing, or you've checked with someone knowledgable
>> and they say you should try it. On a non-broken filesystem (as here),
>> it's probably OK, though.
>>
>>> displays an error "cache and super
>>> generation don't match, space cache will be invalidated."
>>     This is harmless.
>>
>>> How can I correct the total fs size as shown in df?
>>     You can't. It's an artefact of the fact that you've got a RAID-1
>> (or RAID-10, or --mixed and DUP) filesystem, and that the standard
>> kernel interface for df doesn't allow us to report the correct figures
>> -- see [1] (and the subsequent entry as well) for a more detailed
>> description.
>>
>>     Hugo.
>>
>> [1] https://btrfs.wiki.kernel.org/index.php/FAQ#Why_does_df_show_incorrect_free_space_for_my_RAID_volume.3F
>>
>> --
>> === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
>>    PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
>>           --- Nothing right in my left brain. Nothing left in ---
>>                               my right brain.
>
> But my setup is a simple one without any RAID levels or other things so at least
> df size column should show the actual size of my setup.
Could you send us the output of the following?:
  btrfs fi df <mountpoint>
(where <mountpoint> is the path where the btrfs is mounted.)

-- 
__________
Brendan Hide
http://swiftspirit.co.za/
http://www.webafrica.co.za/?AFF1E97


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

* Re: Total fs size does not match with the actual size of the setup
  2013-10-27 21:34     ` Brendan Hide
@ 2013-10-27 21:49       ` Lester B
  0 siblings, 0 replies; 5+ messages in thread
From: Lester B @ 2013-10-27 21:49 UTC (permalink / raw)
  To: linux-btrfs

sudo btrfs fi df <mountpoint>

Data: total=5.62GB, used=4.96GB
System: total=32.00MB, used=4.00KB
Metadata: total=512.00MB, used=288.70MB

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

end of thread, other threads:[~2013-10-27 21:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-27 20:09 Total fs size does not match with the actual size of the setup Lester B
2013-10-27 20:17 ` Hugo Mills
2013-10-27 20:27   ` Lester B
2013-10-27 21:34     ` Brendan Hide
2013-10-27 21:49       ` Lester B

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).