All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Confusing output of btrfs fi df
@ 2014-04-27 15:37 Stefan Malte Schumacher
  2014-04-28  1:48 ` Duncan
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Malte Schumacher @ 2014-04-27 15:37 UTC (permalink / raw)
  To: linux-btrfs

Hello

Chris and Duncan: I tried both your suggestions but unfortunately
without success. Here is the output:

mars:~ # btrfs balance start -susage=0 -f -v /mnt/btrfs/
Dumping filters: flags 0xa, state 0x0, force is on
  SYSTEM (flags 0x2): balancing, usage=0
  Done, had to relocate 0 out of 2708 chunks
  
mars:~ # btrfs fi df /mnt/btrfs/
  Data, RAID1: total=2.64TiB, used=2.22TiB
  System, RAID1: total=8.00MiB, used=380.00KiB
  System, single: total=4.00MiB, used=0.00
  Metadata, RAID1: total=4.00GiB, used=2.94GiB
--------------------------------------------

mars:~ # btrfs balance start -sconvert=raid1,soft -f -v /mnt/btrfs/
Dumping filters: flags 0xa, state 0x0, force is on
  SYSTEM (flags 0x300): converting, target=16, soft is on
  Done, had to relocate 0 out of 2708 chunks

mars:~ # btrfs fi df /mnt/btrfs/
  Data, RAID1: total=2.64TiB, used=2.22TiB
  System, RAID1: total=8.00MiB, used=380.00KiB
  System, single: total=4.00MiB, used=0.00
  Metadata, RAID1: total=4.00GiB, used=2.94GiB

Yours sincerely
Stefan

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

* Re: Confusing output of btrfs fi df
  2014-04-27 15:37 Confusing output of btrfs fi df Stefan Malte Schumacher
@ 2014-04-28  1:48 ` Duncan
  0 siblings, 0 replies; 11+ messages in thread
From: Duncan @ 2014-04-28  1:48 UTC (permalink / raw)
  To: linux-btrfs

Stefan Malte Schumacher posted on Sun, 27 Apr 2014 17:37:26 +0200 as
excerpted:

> Chris and Duncan: I tried both your suggestions but unfortunately
> without success. Here is the output:
> 
> mars:~ # btrfs balance start -susage=0 -f -v /mnt/btrfs/
> Dumping filters: flags 0xa, state 0x0, force is on
>   SYSTEM (flags 0x2): balancing, usage=0
>   Done, had to relocate 0 out of 2708 chunks
>   
> mars:~ # btrfs fi df /mnt/btrfs/
>   Data, RAID1: total=2.64TiB, used=2.22TiB
>   System, RAID1: total=8.00MiB, used=380.00KiB
>   System, single: total=4.00MiB, used=0.00
>   Metadata, RAID1: total=4.00GiB, used=2.94GiB
> --------------------------------------------
> 
> mars:~ # btrfs balance start -sconvert=raid1,soft -f -v /mnt/btrfs/
> Dumping filters: flags 0xa, state 0x0, force is on
>   SYSTEM (flags 0x300): converting, target=16, soft is on
>   Done, had to relocate 0 out of 2708 chunks
> 
> mars:~ # btrfs fi df /mnt/btrfs/
>   Data, RAID1: total=2.64TiB, used=2.22TiB
>   System, RAID1: total=8.00MiB, used=380.00KiB
>   System, single: total=4.00MiB, used=0.00
>   Metadata, RAID1: total=4.00GiB, used=2.94GiB

OK, this is interesting  It may be that you're reproducing something a 
couple other people saw earlier, but I've never seen here, which might be 
because I tend to do -m<whatever (metadata) and let it handle -s/system 
at the same time, instead of doing -s<whatever> explicitly.

So try this one:

btrfs balance start -musage=0 -v

(-f shouldn't be needed for this one because you're not doing -s 
specifically, and not forcing a lower redundancy level.)

It may or may not free a couple metadata chunks too, but at least here, 
that's /exactly/ what I've used, and it has /never/ failed to cleanup 
that unused system chunk.

If that fails to remove the extra system chunk, then we have a mystery 
indeed.  What's different on your system and why isn't it working?

If it succeeds in removing it, then we have a different and more limited 
bug/mystery.  -s sometimes ignores system chunks it's documented to 
balance, while -m is doing both metadata and system, as expected.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


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

* Re: Confusing output of btrfs fi df
@ 2014-04-29  1:28 Stefan Malte Schumacher
  0 siblings, 0 replies; 11+ messages in thread
From: Stefan Malte Schumacher @ 2014-04-29  1:28 UTC (permalink / raw)
  To: linux-btrfs



> The question is, why is this important?

It probably isn't, its just my overactive sense of neatness ;-) 

But, jokes aside, I am going to use the filesystem as it is now and
then when openSUSE 13.2 arrives I will give it another try with a new
kernel and new filesystem tools. 

Thank you for your input, everyone.

Yours
Stefan 

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

* Re: Confusing output of btrfs fi df
  2014-04-26 21:28     ` Chris Murphy
  2014-04-27  1:21       ` Duncan
@ 2014-04-28 12:55       ` Dan van der Ster
  1 sibling, 0 replies; 11+ messages in thread
From: Dan van der Ster @ 2014-04-28 12:55 UTC (permalink / raw)
  To: Chris Murphy; +Cc: Stefan Malte Schumacher, Hugo Mills, linux-btrfs

Hi Stefan,

On Sat, Apr 26, 2014 at 11:28 PM, Chris Murphy <lists@colorremedies.com> wrote:
>>>
>>>   They're harmless -- it's a side-effect of the way that mkfs works.
>>> They'll go away if you balance them:
>>>
>>>   btrfs balance start -dprofiles=single -mprofiles=single -sprofiles=single /mountpoint
>>
>> btrfs refused this command, I had to pass --force to execute it.
>> It exited with this:Done, had to relocate 2 out of 2710 chunks.
>>
>> After that btrfs fi df shows the following:
>>
>> Data, RAID1: total=2.64TiB, used=2.22TiB
>> System, RAID1: total=8.00MiB, used=380.00KiB
>>> System, single: total=4.00MiB, used=0.00<
>> Metadata, RAID1: total=4.00GiB, used=2.94GiB
>
> Hmm, seems like a bug. What about

See this patch: "Btrfs: stop refusing the relocation of chunk 0"

I managed to balance away the empty single System chunk only once I
was running 3.13 from Ubuntu trusty.

http://www.spinics.net/lists/linux-btrfs/msg27119.html

https://bugzilla.kernel.org/show_bug.cgi?id=60594

Cheers, Dan

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

* Re: Confusing output of btrfs fi df
  2014-04-28 11:57 Stefan Malte Schumacher
@ 2014-04-28 12:06 ` Hugo Mills
  0 siblings, 0 replies; 11+ messages in thread
From: Hugo Mills @ 2014-04-28 12:06 UTC (permalink / raw)
  To: Stefan Malte Schumacher; +Cc: linux-btrfs

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

On Mon, Apr 28, 2014 at 01:57:02PM +0200, Stefan Malte Schumacher wrote:
> 
> 
> > So try this one:
> > btrfs balance start -musage=0 -v
> 
> I fear that didn't work too. 
> 
> mars:/mnt # btrfs balance start -musage=0 -v btrfs/
> Dumping filters: flags 0x6, state 0x0, force is off
>   METADATA (flags 0x2): balancing, usage=0
>   SYSTEM (flags 0x2): balancing, usage=0
>   Done, had to relocate 1 out of 2708 chunks
>   
> mars:/mnt # btrfs fi df btrfs/
> Data, RAID1: total=2.64TiB, used=2.22TiB
> System, RAID1: total=8.00MiB, used=380.00KiB
> System, single: total=4.00MiB, used=0.00
> Metadata, RAID1: total=4.00GiB, used=2.94GiB
> 
> 
> >If that fails to remove the extra system chunk, then we have a mystery
> >indeed.  What's different on your system and why isn't it working?
> 
> I have no idea. Its just a plain openSUSE 13.1 and they consider btrfs
> support stable enough to use it as default filesystem in the upcoming
> 13.2. I could create the filesystem again and restore the data but of
> course I would actually need to know what went wrong the first time in
> order to avoid doing it again. Is there anything you need to know
> about my system which would be of use? (Controller, Disks, Mainboard
> etc. ?)  

   The question is, why is this important?

   The presence of that area won't affect the operation of the FS in
the slightest. The FS won't write any data to that area, and it's only
4MiB in size -- completely lost in the noise for a 2.6 TiB filesystem.
At worst, it's an extra line of output; slightly messy, but utterly
harmless.

   I think the default kernel for OpenSuSE 13.1 is 3.11, which may be
old enough that it doesn't have the patch that allows balancing of
chunk 0 (which is probably what's happening here).

   Hugo.

-- 
=== 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
  --- "You are demons,  and I am in Hell!" "Well, technically, it's ---  
               London,  but it's an easy mistake to make."               

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

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

* Re: Confusing output of btrfs fi df
@ 2014-04-28 11:57 Stefan Malte Schumacher
  2014-04-28 12:06 ` Hugo Mills
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Malte Schumacher @ 2014-04-28 11:57 UTC (permalink / raw)
  To: linux-btrfs



> So try this one:
> btrfs balance start -musage=0 -v

I fear that didn't work too. 

mars:/mnt # btrfs balance start -musage=0 -v btrfs/
Dumping filters: flags 0x6, state 0x0, force is off
  METADATA (flags 0x2): balancing, usage=0
  SYSTEM (flags 0x2): balancing, usage=0
  Done, had to relocate 1 out of 2708 chunks
  
mars:/mnt # btrfs fi df btrfs/
Data, RAID1: total=2.64TiB, used=2.22TiB
System, RAID1: total=8.00MiB, used=380.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, RAID1: total=4.00GiB, used=2.94GiB


>If that fails to remove the extra system chunk, then we have a mystery
>indeed.  What's different on your system and why isn't it working?

I have no idea. Its just a plain openSUSE 13.1 and they consider btrfs
support stable enough to use it as default filesystem in the upcoming
13.2. I could create the filesystem again and restore the data but of
course I would actually need to know what went wrong the first time in
order to avoid doing it again. Is there anything you need to know
about my system which would be of use? (Controller, Disks, Mainboard
etc. ?)  

Yours sincerely
Stefan

   

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

* Re: Confusing output of btrfs fi df
  2014-04-26 21:28     ` Chris Murphy
@ 2014-04-27  1:21       ` Duncan
  2014-04-28 12:55       ` Dan van der Ster
  1 sibling, 0 replies; 11+ messages in thread
From: Duncan @ 2014-04-27  1:21 UTC (permalink / raw)
  To: linux-btrfs

Chris Murphy posted on Sat, 26 Apr 2014 15:28:03 -0600 as excerpted:

>>>   btrfs balance start -dprofiles=single -mprofiles=single 
>>> -sprofiles=single /mountpoint
>
>> After that btrfs fi df shows the following:
>> 
>> Data, RAID1: total=2.64TiB, used=2.22TiB
>> System, RAID1: total=8.00MiB, used=380.00KiB
>> > System, single: total=4.00MiB, used=0.00 <
>> Metadata, RAID1: total=4.00GiB, used=2.94GiB
> 
> Hmm, seems like a bug. What about
> 
> btrfs balance start -sconvert=raid1,soft -f -v

... Or simply...

btrfs balance start -susage=0 -f -v

In theory, metadata includes system, so system shouldn't need to be done 
on its own.  If system IS explicitly listed, however, force must be used 
as well, as you found out.

The convert=raid1 should convert all named types to raid1, while the soft 
keeps it from redoing all chunks that are already in target mode.

usage=N says only do the chunks with usage at or below N%, and 
profile=single says only do those in single profile.

So since the system chunk in question is single mode, balance start -
sprofile=single -f /should/ have converted it, but didn't.  My guess is 
that for some reason it didn't realize that you actually wanted system 
converted and what to, since you only gave it the existing profile, not 
the target profile.  For metadata it did the right thing anyway, but 
apparently not for system.

But given the above, there's multiple ways to skin that cat.  The 
-sconvert=raid1,soft -f /should/ do it as well, and I expect it will, 
since that actually tells it the target format.

But if for some reason that doesn't work either, I /know/ the -susage=0 
-f should do it, since usage=0 is the one I've always used to do it here.

If you did -musage=0, that should actually include both metadata and 
system, and doesn't need -f.  I've found that to be the case here too.  
But the -m might find a few additional non-system metadata blocks to free 
in the process, which wouldn't be a bad thing but could take a bit more 
time.  (Tho at 0 usage it shouldn't take much! =:^)

Actually, given your metadata total of 4 GiB, nearly 3 GiB used, it's 
quite possible that would end up returning a couple chunks, giving you 
3.5 GiB total, still nearly 3 GiB used.  Tho it depends on whether 
there's actually free metadata chunks or not, since the usage=0 says 
don't bother if they aren't totally empty.  (It normally wouldn't free 
all the way down to 3 GiB metadata total, however, since the filesystem 
reserves a couple hundred MiB for its own use, metadata chunks are 256 MiB 
each, and they're raid1, so they're allocated in pairs.  Thus, even a 
full balance would probably leave you at 3.5 GiB total metadata, still 
just under 3 GiB used.)


-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


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

* Re: Confusing output of btrfs fi df
  2014-04-26 18:18   ` Stefan Malte Schumacher
@ 2014-04-26 21:28     ` Chris Murphy
  2014-04-27  1:21       ` Duncan
  2014-04-28 12:55       ` Dan van der Ster
  0 siblings, 2 replies; 11+ messages in thread
From: Chris Murphy @ 2014-04-26 21:28 UTC (permalink / raw)
  To: Stefan Malte Schumacher; +Cc: Hugo Mills, linux-btrfs


On Apr 26, 2014, at 12:18 PM, Stefan Malte Schumacher <s.schumacher@netcologne.de> wrote:

>> 
>>   They're harmless -- it's a side-effect of the way that mkfs works.
>> They'll go away if you balance them:
>> 
>>   btrfs balance start -dprofiles=single -mprofiles=single -sprofiles=single /mountpoint
> 
> btrfs refused this command, I had to pass --force to execute it.
> It exited with this:Done, had to relocate 2 out of 2710 chunks.
> 
> After that btrfs fi df shows the following:
> 
> Data, RAID1: total=2.64TiB, used=2.22TiB
> System, RAID1: total=8.00MiB, used=380.00KiB
>> System, single: total=4.00MiB, used=0.00<
> Metadata, RAID1: total=4.00GiB, used=2.94GiB

Hmm, seems like a bug. What about 

btrfs balance start -sconvert=raid1,soft -f -v



> 
> 
>>   btrfs fi label should do this.
> 
> I was mainly asking because of this:
> https://btrfs.wiki.kernel.org/index.php/UseCases: You can also use
> btrfs command.There are currently few limitations: the filesystem has
> to be unmounted the filesystem should not have more than one device 
> 
> Is this information outdated?

btfs fi label is done when the system is mounted; for the change to visibly take effect in /dev/ it has to be umounted then mounted. I don't even think it takes effect with a remount, but I could be mistaken. This seems to be a btrfs limitation, if I relabel ext4 volumes while mounted, their label is changed immediately, so the behavior may change down the road.


Chris Murphy


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

* Re: Confusing output of btrfs fi df
  2014-04-26 14:30 ` Hugo Mills
@ 2014-04-26 18:18   ` Stefan Malte Schumacher
  2014-04-26 21:28     ` Chris Murphy
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Malte Schumacher @ 2014-04-26 18:18 UTC (permalink / raw)
  To: Hugo Mills, linux-btrfs

> 
>    They're harmless -- it's a side-effect of the way that mkfs works.
> They'll go away if you balance them:
> 
>    btrfs balance start -dprofiles=single -mprofiles=single -sprofiles=single /mountpoint

btrfs refused this command, I had to pass --force to execute it.
It exited with this:Done, had to relocate 2 out of 2710 chunks.

After that btrfs fi df shows the following:

 Data, RAID1: total=2.64TiB, used=2.22TiB
 System, RAID1: total=8.00MiB, used=380.00KiB
>System, single: total=4.00MiB, used=0.00<
 Metadata, RAID1: total=4.00GiB, used=2.94GiB

 
>    btrfs fi label should do this.

I was mainly asking because of this:
https://btrfs.wiki.kernel.org/index.php/UseCases: You can also use
btrfs command.There are currently few limitations: the filesystem has
to be unmounted the filesystem should not have more than one device 

Is this information outdated?

> You might want to look at upgrading to 3.13 or 3.14 kernel, which
> has 6 months or so extra bug fixes in it.

Thanks, going to have a look if openSUSE has anything more recent in
their repositories.

Bye
Stefan


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

* Re: Confusing output of btrfs fi df
  2014-04-26 14:09 Stefan Malte Schumacher
@ 2014-04-26 14:30 ` Hugo Mills
  2014-04-26 18:18   ` Stefan Malte Schumacher
  0 siblings, 1 reply; 11+ messages in thread
From: Hugo Mills @ 2014-04-26 14:30 UTC (permalink / raw)
  To: Stefan Malte Schumacher; +Cc: linux-btrfs

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

On Sat, Apr 26, 2014 at 04:09:15PM +0200, Stefan Malte Schumacher wrote:
> Hello
> 
> Yesterday I created a btrfs-filesystem on two disk, using raid1 for
> data and metadata. I then mounted it and rsynced several TB of data
> onto it.
> 
> mkfs.btrfs -m raid1 -d raid1 /dev/sdf /dev/sdg
> 
> The command btrfs fi df /mnt/btrfs result in the following output:
> 
> Data, RAID1: total=2.64TiB, used=2.22TiB
> Data, single: total=8.00MiB, used=0.00
> System, RAID1: total=8.00MiB, used=380.00KiB
> System, single: total=4.00MiB, used=0.00
> Metadata, RAID1: total=4.00GiB, used=2.94GiB
> Metadata, single: total=8.00MiB, used=0.00
> 
> I am a bit confused because of the "single"-entries. They are not
> shown in the UseCases-example on the btrfs-website and I wonder if I
> did something wrong.

   They're harmless -- it's a side-effect of the way that mkfs works.
They'll go away if you balance them:

   btrfs balance start -dprofiles=single -mprofiles=single -sprofiles=single /mountpoint

> I also would like to know if its possible to label a multi-disk
> filesystem after creation. 

   btrfs fi label should do this.

> For your information, I am using Btrfs v3.12+20131125 and kernel
> 3.11.10-7 64bit. My distribution is an openSUSE 13.1.

   You might want to look at upgrading to 3.13 or 3.14 kernel, which
has 6 months or so extra bug fixes in it.

   Hugo.

-- 
=== 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
             --- Keming (n.) The result of poor kerning ---              

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

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

* Confusing output of btrfs fi df
@ 2014-04-26 14:09 Stefan Malte Schumacher
  2014-04-26 14:30 ` Hugo Mills
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Malte Schumacher @ 2014-04-26 14:09 UTC (permalink / raw)
  To: linux-btrfs

Hello

Yesterday I created a btrfs-filesystem on two disk, using raid1 for
data and metadata. I then mounted it and rsynced several TB of data
onto it.

mkfs.btrfs -m raid1 -d raid1 /dev/sdf /dev/sdg

The command btrfs fi df /mnt/btrfs result in the following output:

Data, RAID1: total=2.64TiB, used=2.22TiB
Data, single: total=8.00MiB, used=0.00
System, RAID1: total=8.00MiB, used=380.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, RAID1: total=4.00GiB, used=2.94GiB
Metadata, single: total=8.00MiB, used=0.00

I am a bit confused because of the "single"-entries. They are not
shown in the UseCases-example on the btrfs-website and I wonder if I
did something wrong.

I also would like to know if its possible to label a multi-disk
filesystem after creation. 

For your information, I am using Btrfs v3.12+20131125 and kernel
3.11.10-7 64bit. My distribution is an openSUSE 13.1.

Yours
Stefan

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

end of thread, other threads:[~2014-04-29  1:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-27 15:37 Confusing output of btrfs fi df Stefan Malte Schumacher
2014-04-28  1:48 ` Duncan
  -- strict thread matches above, loose matches on Subject: below --
2014-04-29  1:28 Stefan Malte Schumacher
2014-04-28 11:57 Stefan Malte Schumacher
2014-04-28 12:06 ` Hugo Mills
2014-04-26 14:09 Stefan Malte Schumacher
2014-04-26 14:30 ` Hugo Mills
2014-04-26 18:18   ` Stefan Malte Schumacher
2014-04-26 21:28     ` Chris Murphy
2014-04-27  1:21       ` Duncan
2014-04-28 12:55       ` Dan van der Ster

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.