* btrfs fi df won't show total=
@ 2012-07-09 19:14 Jan Engelhardt
2012-07-09 19:25 ` Hugo Mills
0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2012-07-09 19:14 UTC (permalink / raw)
To: linux-btrfs
On openSUSE_12.1 with Btrfs v0.19+20120406, the following can be
observed: after a change of the profiles, total=,used= is no
longer shown:
20:49 mmsrv1:~ # btrfs fi df /top.srv/
Data, RAID10: total=152.00GiB, used=121.07GiB
System, RAID1: total=40.00MiB, used=44.00KiB
System: total=4.00MiB, used=0.00
Metadata, RAID1: total=112.00GiB, used=1.30GiB
Metadata: total=8.00MiB, used=0.00
20:50 mmsrv1:~ # btrfs fi bal start -mconvert=raid10 -sconvert=raid10
/top.srv/
Refusing to explicitly operate on system chunks.
Pass --force if you really want to do that.
20:52 mmsrv1:~ # btrfs fi bal start -mconvert=raid10 -sconvert=raid10
--force /top.srv/
...
21:10 mmsrv1:~ # btrfs fi df /top.srv/
Data, RAID10: total=156.00GiB, used=124.35GiB
System, RAID10: total=128.00MiB, used=48.00KiB
System: total=4.00MiB, used=0.00
Metadata, RAID10: total=112.00GiB, used=1.38GiB
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: btrfs fi df won't show total=
2012-07-09 19:14 btrfs fi df won't show total= Jan Engelhardt
@ 2012-07-09 19:25 ` Hugo Mills
2012-07-09 20:06 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Hugo Mills @ 2012-07-09 19:25 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]
On Mon, Jul 09, 2012 at 09:14:03PM +0200, Jan Engelhardt wrote:
>
> On openSUSE_12.1 with Btrfs v0.19+20120406, the following can be
> observed: after a change of the profiles, total=,used= is no
> longer shown:
>
>
> 20:49 mmsrv1:~ # btrfs fi df /top.srv/
> Data, RAID10: total=152.00GiB, used=121.07GiB
> System, RAID1: total=40.00MiB, used=44.00KiB
> System: total=4.00MiB, used=0.00
> Metadata, RAID1: total=112.00GiB, used=1.30GiB
> Metadata: total=8.00MiB, used=0.00
> 20:50 mmsrv1:~ # btrfs fi bal start -mconvert=raid10 -sconvert=raid10
> /top.srv/
> Refusing to explicitly operate on system chunks.
> Pass --force if you really want to do that.
> 20:52 mmsrv1:~ # btrfs fi bal start -mconvert=raid10 -sconvert=raid10
> --force /top.srv/
> ...
> 21:10 mmsrv1:~ # btrfs fi df /top.srv/
> Data, RAID10: total=156.00GiB, used=124.35GiB
> System, RAID10: total=128.00MiB, used=48.00KiB
> System: total=4.00MiB, used=0.00
> Metadata, RAID10: total=112.00GiB, used=1.38GiB
What's the problem here? You no longer have any RAID1 chunks, so
it's not showing them.
Hugo.
--
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- IMPROVE YOUR ORGANISMS!! -- Subject line of spam email ---
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: btrfs fi df won't show total=
2012-07-09 19:25 ` Hugo Mills
@ 2012-07-09 20:06 ` Jan Engelhardt
2012-07-09 20:25 ` Hugo Mills
2012-07-09 21:52 ` Ilya Dryomov
0 siblings, 2 replies; 6+ messages in thread
From: Jan Engelhardt @ 2012-07-09 20:06 UTC (permalink / raw)
To: Hugo Mills; +Cc: linux-btrfs
On Monday 2012-07-09 21:25, Hugo Mills wrote:
>On Mon, Jul 09, 2012 at 09:14:03PM +0200, Jan Engelhardt wrote:
>>
>> On openSUSE_12.1 with Btrfs v0.19+20120406, the following can be
>> observed: after a change of the profiles, total=,used= is no
>> longer shown:
>>
>> 20:49 mmsrv1:~ # btrfs fi df /top.srv/
>> Data, RAID10: total=152.00GiB, used=121.07GiB
>> System, RAID1: total=40.00MiB, used=44.00KiB
>> System: total=4.00MiB, used=0.00
>> Metadata, RAID1: total=112.00GiB, used=1.30GiB
>> Metadata: total=8.00MiB, used=0.00
>>[...]
>> 21:10 mmsrv1:~ # btrfs fi df /top.srv/
>> Data, RAID10: total=156.00GiB, used=124.35GiB
>> System, RAID10: total=128.00MiB, used=48.00KiB
>> System: total=4.00MiB, used=0.00
>> Metadata, RAID10: total=112.00GiB, used=1.38GiB
>
> What's the problem here? You no longer have any RAID1 chunks, so
>it's not showing them.
Rather tha a 4-line output, I would have expected this 6-line output
that I would also get when mkfs'ing a new fresh btrfs volume with
raid10 from the start:
Data, RAID10: total=156.00GiB, used=124.35GiB
Data: total=foo, used=bar
System, RAID10: total=128.00MiB, used=48.00KiB
System: total=4.00MiB, used=0.00
Metadata, RAID10: total=112.00GiB, used=1.38GiB
Metadata: total=foo, used=bar
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: btrfs fi df won't show total=
2012-07-09 20:06 ` Jan Engelhardt
@ 2012-07-09 20:25 ` Hugo Mills
2012-07-09 21:52 ` Ilya Dryomov
1 sibling, 0 replies; 6+ messages in thread
From: Hugo Mills @ 2012-07-09 20:25 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 2114 bytes --]
On Mon, Jul 09, 2012 at 10:06:24PM +0200, Jan Engelhardt wrote:
>
> On Monday 2012-07-09 21:25, Hugo Mills wrote:
> >On Mon, Jul 09, 2012 at 09:14:03PM +0200, Jan Engelhardt wrote:
> >>
> >> On openSUSE_12.1 with Btrfs v0.19+20120406, the following can be
> >> observed: after a change of the profiles, total=,used= is no
> >> longer shown:
> >>
> >> 20:49 mmsrv1:~ # btrfs fi df /top.srv/
> >> Data, RAID10: total=152.00GiB, used=121.07GiB
> >> System, RAID1: total=40.00MiB, used=44.00KiB
> >> System: total=4.00MiB, used=0.00
> >> Metadata, RAID1: total=112.00GiB, used=1.30GiB
> >> Metadata: total=8.00MiB, used=0.00
> >>[...]
> >> 21:10 mmsrv1:~ # btrfs fi df /top.srv/
> >> Data, RAID10: total=156.00GiB, used=124.35GiB
> >> System, RAID10: total=128.00MiB, used=48.00KiB
> >> System: total=4.00MiB, used=0.00
> >> Metadata, RAID10: total=112.00GiB, used=1.38GiB
> >
> > What's the problem here? You no longer have any RAID1 chunks, so
> >it's not showing them.
>
> Rather tha a 4-line output, I would have expected this 6-line output
> that I would also get when mkfs'ing a new fresh btrfs volume with
> raid10 from the start:
>
> Data, RAID10: total=156.00GiB, used=124.35GiB
> Data: total=foo, used=bar
> System, RAID10: total=128.00MiB, used=48.00KiB
> System: total=4.00MiB, used=0.00
> Metadata, RAID10: total=112.00GiB, used=1.38GiB
> Metadata: total=foo, used=bar
The lines without the RAID marker are there as a result of the way
that mkfs works -- it creates stub chunks which are never used, and
then upgrades to the required RAID level immediately afterwards.
The balance (any balance, not just a conversion) processes these
chunks as well as all the other chunks in the FS, and rewrites all of
the data in them (all 0 bytes of it) somewhere else, removing the
originals.
Hugo.
--
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- Well, you don't get to be a kernel hacker simply by looking ---
good in Speedos. -- Rusty Russell
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: btrfs fi df won't show total=
2012-07-09 20:06 ` Jan Engelhardt
2012-07-09 20:25 ` Hugo Mills
@ 2012-07-09 21:52 ` Ilya Dryomov
2012-07-12 7:59 ` Andrei Popa
1 sibling, 1 reply; 6+ messages in thread
From: Ilya Dryomov @ 2012-07-09 21:52 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Hugo Mills, linux-btrfs
On Mon, Jul 09, 2012 at 10:06:24PM +0200, Jan Engelhardt wrote:
>
> On Monday 2012-07-09 21:25, Hugo Mills wrote:
> >On Mon, Jul 09, 2012 at 09:14:03PM +0200, Jan Engelhardt wrote:
> >>
> >> On openSUSE_12.1 with Btrfs v0.19+20120406, the following can be
> >> observed: after a change of the profiles, total=,used= is no
> >> longer shown:
> >>
> >> 20:49 mmsrv1:~ # btrfs fi df /top.srv/
> >> Data, RAID10: total=152.00GiB, used=121.07GiB
> >> System, RAID1: total=40.00MiB, used=44.00KiB
> >> System: total=4.00MiB, used=0.00
> >> Metadata, RAID1: total=112.00GiB, used=1.30GiB
> >> Metadata: total=8.00MiB, used=0.00
> >>[...]
> >> 21:10 mmsrv1:~ # btrfs fi df /top.srv/
> >> Data, RAID10: total=156.00GiB, used=124.35GiB
> >> System, RAID10: total=128.00MiB, used=48.00KiB
> >> System: total=4.00MiB, used=0.00
> >> Metadata, RAID10: total=112.00GiB, used=1.38GiB
> >
> > What's the problem here? You no longer have any RAID1 chunks, so
> >it's not showing them.
>
> Rather tha a 4-line output, I would have expected this 6-line output
> that I would also get when mkfs'ing a new fresh btrfs volume with
> raid10 from the start:
>
> Data, RAID10: total=156.00GiB, used=124.35GiB
> Data: total=foo, used=bar
> System, RAID10: total=128.00MiB, used=48.00KiB
> System: total=4.00MiB, used=0.00
> Metadata, RAID10: total=112.00GiB, used=1.38GiB
> Metadata: total=foo, used=bar
mkfs creates those non-raid chunks for a pretty stupid reason, they
really shouldn't be there if you create a raid10 fs. Balance does the
right thing and removes them. Fixing this along with another mkfs
annoyance related to this one is on my TODO list.
Thanks,
Ilya
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: btrfs fi df won't show total=
2012-07-09 21:52 ` Ilya Dryomov
@ 2012-07-12 7:59 ` Andrei Popa
0 siblings, 0 replies; 6+ messages in thread
From: Andrei Popa @ 2012-07-12 7:59 UTC (permalink / raw)
To: Ilya Dryomov; +Cc: Jan Engelhardt, Hugo Mills, linux-btrfs
On Tue, 2012-07-10 at 00:52 +0300, Ilya Dryomov wrote:
> mkfs creates those non-raid chunks for a pretty stupid reason, they
> really shouldn't be there if you create a raid10 fs. Balance does the
> right thing and removes them. Fixing this along with another mkfs
> annoyance related to this one is on my TODO list.
Hi Ilya,
I've also studied this bug and found where the problem is, if this will
help you:
In mkfs.c, "make_root_dir" function creates the first system and
metadata chunk:
ret = btrfs_make_block_group(trans, root, bytes_used,
BTRFS_BLOCK_GROUP_SYSTEM,
BTRFS_FIRST_CHUNK_TREE_OBJECTID,
0, BTRFS_MKFS_SYSTEM_GROUP_SIZE);
....
ret = btrfs_alloc_chunk(trans,
root->fs_info->extent_root,
&chunk_start, &chunk_size,
BTRFS_BLOCK_GROUP_METADATA |
BTRFS_BLOCK_GROUP_DATA);
BUG_ON(ret);
ret = btrfs_make_block_group(trans, root, 0,
BTRFS_BLOCK_GROUP_METADATA
|
BTRFS_BLOCK_GROUP_DATA,
BTRFS_FIRST_CHUNK_TREE_OBJECTID,
chunk_start, chunk_size);
And these chunks are created again in "create_raid_groups" function.
Both functions, "make_root_dir" and "create_raid_groups" are called from
"main" function.
Andrei
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-07-12 7:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-09 19:14 btrfs fi df won't show total= Jan Engelhardt
2012-07-09 19:25 ` Hugo Mills
2012-07-09 20:06 ` Jan Engelhardt
2012-07-09 20:25 ` Hugo Mills
2012-07-09 21:52 ` Ilya Dryomov
2012-07-12 7:59 ` Andrei Popa
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).