All of lore.kernel.org
 help / color / mirror / Atom feed
From: Forza <forza@tnonline.net>
To: Leszek Dubiel <leszek@dubiel.pl>, linux-btrfs@vger.kernel.org
Subject: Re: Btrfs not using all devices in raid1
Date: Fri, 21 May 2021 22:11:38 +0200 (GMT+02:00)	[thread overview]
Message-ID: <89853f6.7deb9c63.179908e0b59@tnonline.net> (raw)
In-Reply-To: <63123a58-18a4-24ff-3b30-9a0668c167c4@dubiel.pl>



---- From: Leszek Dubiel <leszek@dubiel.pl> -- Sent: 2021-05-21 - 18:34 ----

> 
> Hello!
> 
> Why Btrfs is not using /dev/sdc2?
> There is no line "Data,RAID1" for this disk.
> Isn't it supposed to use disk that has most of free space?
> 
> Thanks for help :) :)
> Using Btrfs in production.
> 
> 
> Here are some command outputs:
> 
> 
> 
> ### btrfs fi show /
> 
> Label: none  uuid: ea6ae51d-d9b0-4628-a8f3-3406e1dc59c6
>      Total devices 4 FS bytes used 2.96TiB
>      devid    1 size 7.25TiB used 3.20TiB path /dev/sda2
>      devid    2 size 7.25TiB used 3.20TiB path /dev/sdb2
>      devid    3 size 7.25TiB used 3.21TiB path /dev/sdd2
>      devid    4 size 7.25TiB used 32.00MiB path /dev/sdc2
> 
> 
> 
> ### btrfs fi df /
> 
> Data, RAID1: total=4.49TiB, used=2.90TiB
> System, RAID1: total=64.00MiB, used=784.00KiB
> Metadata, RAID1: total=321.00GiB, used=56.08GiB
> GlobalReserve, single: total=512.00MiB, used=0.00B
> 
> 
> 
> ### btrfs dev usa /
> 
> /dev/sda2, ID: 1
>     Device size:             7.25TiB
>     Device slack:              0.00B
>     Data,RAID1:              2.99TiB
>     Metadata,RAID1:        210.00GiB
>     System,RAID1:           64.00MiB
>     Unallocated:             4.05TiB
> 
> /dev/sdb2, ID: 2
>     Device size:             7.25TiB
>     Device slack:              0.00B
>     Data,RAID1:              3.00TiB
>     Metadata,RAID1:        210.00GiB
>     Unallocated:             4.04TiB
> 
> /dev/sdc2, ID: 4
>     Device size:             7.25TiB
>     Device slack:              0.00B   ... no Data/RAID1
>     System,RAID1:           32.00MiB
>     Unallocated:             7.25TiB
> 
> /dev/sdd2, ID: 3
>     Device size:             7.25TiB
>     Device slack:              0.00B
>     Data,RAID1:              2.99TiB
>     Metadata,RAID1:        222.00GiB
>     System,RAID1:           32.00MiB
>     Unallocated:             4.04TiB
> 
> 
> 
> ### time btrfs balance start -dconvert=raid1,soft -mconvert=raid1,soft /
> 
> Done, had to relocate 0 out of 4922 chunks
> 
> real    0m0,522s
> user    0m0,000s
> sys    0m0,033s
> 
> 

Raid1 means two copies on different devices. This is fulfilled with the previous 3 drives so the  'soft' keyword is not going to help here. 

You can do a full data balance (-dusage=100) to move some data across to the new disk. There is no need to do a metadata balance in this case, unless you want to convert to raid1c3 to have three copies of metadata. 

If you do nothing, the filesystem will eventually balance itself as you add abs delete data. 

https://btrfs.wiki.kernel.org/index.php/Balance_Filters



  reply	other threads:[~2021-05-21 20:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 16:34 Btrfs not using all devices in raid1 Leszek Dubiel
2021-05-21 20:11 ` Forza [this message]
2021-05-21 21:10   ` Leszek Dubiel
2021-05-21 21:53     ` Forza
2021-05-22  2:08 ` Zygo Blaxell
2021-05-22  8:52   ` Leszek Dubiel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89853f6.7deb9c63.179908e0b59@tnonline.net \
    --to=forza@tnonline.net \
    --cc=leszek@dubiel.pl \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.