* Interpreting `btrfs filesystem show'
@ 2018-10-15 14:24 Anton Shepelev
2018-10-15 14:26 ` Hugo Mills
0 siblings, 1 reply; 6+ messages in thread
From: Anton Shepelev @ 2018-10-15 14:24 UTC (permalink / raw)
To: linux-btrfs
Hello, all
While trying to resolve free space problems, and found that
I cannot interpret the output of:
> btrfs filesystem show
Label: none uuid: 8971ce5b-71d9-4e46-ab25-ca37485784c8
Total devices 1 FS bytes used 34.06GiB
devid 1 size 40.00GiB used 37.82GiB path /dev/sda2
How come the total used value is less than the value listed
for the only device?
--
() ascii ribbon campaign - against html e-mail
/\ http://preview.tinyurl.com/qcy6mjc [archived]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Interpreting `btrfs filesystem show'
2018-10-15 14:24 Interpreting `btrfs filesystem show' Anton Shepelev
@ 2018-10-15 14:26 ` Hugo Mills
2018-10-15 14:30 ` Hugo Mills
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Hugo Mills @ 2018-10-15 14:26 UTC (permalink / raw)
To: Anton Shepelev; +Cc: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]
On Mon, Oct 15, 2018 at 05:24:08PM +0300, Anton Shepelev wrote:
> Hello, all
>
> While trying to resolve free space problems, and found that
> I cannot interpret the output of:
>
> > btrfs filesystem show
>
> Label: none uuid: 8971ce5b-71d9-4e46-ab25-ca37485784c8
> Total devices 1 FS bytes used 34.06GiB
> devid 1 size 40.00GiB used 37.82GiB path /dev/sda2
>
> How come the total used value is less than the value listed
> for the only device?
"Used" on the device is the mount of space allocated. "Used" on the
FS is the total amount of actual data and metadata in that allocation.
You will also need to look at the output of "btrfs fi df" to see
the breakdown of the 37.82 GiB into data, metadata and currently
unused.
See https://btrfs.wiki.kernel.org/index.php/FAQ#Understanding_free_space.2C_using_the_original_tools for the details.
Hugo.
--
Hugo Mills | "Your problem is that you have a negative
hugo@... carfax.org.uk | personality."
http://carfax.org.uk/ | "No, I don't!"
PGP: E2AB1DE4 | Londo and Vir, Babylon 5
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Interpreting `btrfs filesystem show'
2018-10-15 14:26 ` Hugo Mills
@ 2018-10-15 14:30 ` Hugo Mills
[not found] ` <20181015174040.6f4962336386d8549026908c@gmail.com>
2018-10-15 15:48 ` Martin Steigerwald
2 siblings, 0 replies; 6+ messages in thread
From: Hugo Mills @ 2018-10-15 14:30 UTC (permalink / raw)
To: Anton Shepelev, linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]
On Mon, Oct 15, 2018 at 02:26:41PM +0000, Hugo Mills wrote:
> On Mon, Oct 15, 2018 at 05:24:08PM +0300, Anton Shepelev wrote:
> > Hello, all
> >
> > While trying to resolve free space problems, and found that
> > I cannot interpret the output of:
> >
> > > btrfs filesystem show
> >
> > Label: none uuid: 8971ce5b-71d9-4e46-ab25-ca37485784c8
> > Total devices 1 FS bytes used 34.06GiB
> > devid 1 size 40.00GiB used 37.82GiB path /dev/sda2
> >
> > How come the total used value is less than the value listed
> > for the only device?
>
> "Used" on the device is the mount of space allocated. "Used" on the
s/mount/amount/
> FS is the total amount of actual data and metadata in that allocation.
>
> You will also need to look at the output of "btrfs fi df" to see
> the breakdown of the 37.82 GiB into data, metadata and currently
> unused.
>
> See https://btrfs.wiki.kernel.org/index.php/FAQ#Understanding_free_space.2C_using_the_original_tools for the details.
>
> Hugo.
>
--
Hugo Mills | "Your problem is that you have a negative
hugo@... carfax.org.uk | personality."
http://carfax.org.uk/ | "No, I don't!"
PGP: E2AB1DE4 | Londo and Vir, Babylon 5
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Interpreting `btrfs filesystem show'
[not found] ` <20181015174040.6f4962336386d8549026908c@gmail.com>
@ 2018-10-15 14:42 ` Anton Shepelev
2018-10-15 15:02 ` Austin S. Hemmelgarn
0 siblings, 1 reply; 6+ messages in thread
From: Anton Shepelev @ 2018-10-15 14:42 UTC (permalink / raw)
To: linux-btrfs
Hugo Mills to Anton Shepelev:
>>While trying to resolve free space problems, and found
>>that I cannot interpret the output of:
>>
>>> btrfs filesystem show
>>
>>Label: none uuid: 8971ce5b-71d9-4e46-ab25-ca37485784c8
>> Total devices 1 FS bytes used 34.06GiB
>> devid 1 size 40.00GiB used 37.82GiB path /dev/sda2
>>
>>How come the total used value is less than the value
>>listed for the only device?
>
> "Used" on the device is the mount of space allocated.
>"Used" on the FS is the total amount of actual data and
>metadata in that allocation.
>
> You will also need to look at the output of "btrfs fi
>df" to see the breakdown of the 37.82 GiB into data,
>metadata and currently unused.
>
>See
>https://btrfs.wiki.kernel.org/index.php/FAQ#Understanding_free_space.2C_using_the_original_tools for the details
Thank you, Hugo, understood. mount/amount is a very fitting
typo :-)
Does the standard `du' tool work correctly for btfrfs?
--
() ascii ribbon campaign - against html e-mail
/\ http://preview.tinyurl.com/qcy6mjc [archived]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Interpreting `btrfs filesystem show'
2018-10-15 14:42 ` Anton Shepelev
@ 2018-10-15 15:02 ` Austin S. Hemmelgarn
0 siblings, 0 replies; 6+ messages in thread
From: Austin S. Hemmelgarn @ 2018-10-15 15:02 UTC (permalink / raw)
To: Anton Shepelev, linux-btrfs
On 2018-10-15 10:42, Anton Shepelev wrote:
> Hugo Mills to Anton Shepelev:
>
>>> While trying to resolve free space problems, and found
>>> that I cannot interpret the output of:
>>>
>>>> btrfs filesystem show
>>>
>>> Label: none uuid: 8971ce5b-71d9-4e46-ab25-ca37485784c8
>>> Total devices 1 FS bytes used 34.06GiB
>>> devid 1 size 40.00GiB used 37.82GiB path /dev/sda2
>>>
>>> How come the total used value is less than the value
>>> listed for the only device?
>>
>> "Used" on the device is the mount of space allocated.
>> "Used" on the FS is the total amount of actual data and
>> metadata in that allocation.
>>
>> You will also need to look at the output of "btrfs fi
>> df" to see the breakdown of the 37.82 GiB into data,
>> metadata and currently unused.
>>
>> See
>> https://btrfs.wiki.kernel.org/index.php/FAQ#Understanding_free_space.2C_using_the_original_tools for the details
>
> Thank you, Hugo, understood. mount/amount is a very fitting
> typo :-)
>
> Does the standard `du' tool work correctly for btfrfs?
>
For the default 'physical usage' mode, it functionally does not work
correctly, because it does not know about reflinks. The easiest way to
see this is to create a couple of snapshots of a subvolume alongside the
subvolume, and then run `du -s --totals` on those snapshots and the
subvolume. It will report the total space usage to be equal to the sum
of the values reported for each snapshot and the subvolume, when it
should instead only count the space usage for shared data once.
For the 'apparent usage' mode provided by the GNU implementation, it
does work correctly.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Interpreting `btrfs filesystem show'
2018-10-15 14:26 ` Hugo Mills
2018-10-15 14:30 ` Hugo Mills
[not found] ` <20181015174040.6f4962336386d8549026908c@gmail.com>
@ 2018-10-15 15:48 ` Martin Steigerwald
2 siblings, 0 replies; 6+ messages in thread
From: Martin Steigerwald @ 2018-10-15 15:48 UTC (permalink / raw)
To: Hugo Mills, Anton Shepelev, linux-btrfs
Hugo Mills - 15.10.18, 16:26:
> On Mon, Oct 15, 2018 at 05:24:08PM +0300, Anton Shepelev wrote:
> > Hello, all
> >
> > While trying to resolve free space problems, and found that
> >
> > I cannot interpret the output of:
> > > btrfs filesystem show
> >
> > Label: none uuid: 8971ce5b-71d9-4e46-ab25-ca37485784c8
> > Total devices 1 FS bytes used 34.06GiB
> > devid 1 size 40.00GiB used 37.82GiB path /dev/sda2
> >
> > How come the total used value is less than the value listed
> > for the only device?
>
> "Used" on the device is the mount of space allocated. "Used" on the
> FS is the total amount of actual data and metadata in that
> allocation.
>
> You will also need to look at the output of "btrfs fi df" to see
> the breakdown of the 37.82 GiB into data, metadata and currently
> unused.
I usually use btrfs fi usage -T, cause
1. It has all the information.
2. It differentiates between used and allocated.
% btrfs fi usage -T /
Overall:
Device size: 100.00GiB
Device allocated: 54.06GiB
Device unallocated: 45.94GiB
Device missing: 0.00B
Used: 46.24GiB
Free (estimated): 25.58GiB (min: 25.58GiB)
Data ratio: 2.00
Metadata ratio: 2.00
Global reserve: 70.91MiB (used: 0.00B)
Data Metadata System
Id Path RAID1 RAID1 RAID1 Unallocated
-- ------------------------ -------- --------- -------- -----------
2 /dev/mapper/msata-debian 25.00GiB 2.00GiB 32.00MiB 22.97GiB
1 /dev/mapper/sata-debian 25.00GiB 2.00GiB 32.00MiB 22.97GiB
-- ------------------------ -------- --------- -------- -----------
Total 25.00GiB 2.00GiB 32.00MiB 45.94GiB
Used 22.38GiB 754.66MiB 16.00KiB
For RAID it in some place reports the raw size and sometimes the logical
size. Especially in the "Total" line I find this a bit inconsistent.
"RAID1" columns show logical size, "Unallocated" shows raw size.
Also "Used:" in the global section shows raw size and "Free
(estimated):" shows logical size.
Thanks
--
Martin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-10-15 15:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 14:24 Interpreting `btrfs filesystem show' Anton Shepelev
2018-10-15 14:26 ` Hugo Mills
2018-10-15 14:30 ` Hugo Mills
[not found] ` <20181015174040.6f4962336386d8549026908c@gmail.com>
2018-10-15 14:42 ` Anton Shepelev
2018-10-15 15:02 ` Austin S. Hemmelgarn
2018-10-15 15:48 ` Martin Steigerwald
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).