View previous topic :: View next topic |
Author |
Message |
DawgG l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/141141986446bd852be0016.jpg)
Joined: 17 Sep 2003 Posts: 874
|
Posted: Wed Jul 28, 2021 2:21 pm Post subject: how to avoid balance after btrfs replace in raid ? |
|
|
i just replaced some old devices in a couple of btrfs-raid-1-systems using the method https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices -> Replacing_Failed_Devices
1 umount fs
2 replace disk
3 mount in degraded mode
4 do btrfs replace
5 done
the first time i formatted the partition on the new device with btrfs, the next time i just used a "raw" partition w/out an fs to replace the old dev/partition with.
in both cases i decided to (had to) rebalance the fs after btrfs replace because
Code: | phobos ~ # btrfs fi df /mnt/backup/
Data, RAID1: total=627.00GiB, used=626.10GiB
Data, single: total=628.00GiB, used=3.50MiB
System, RAID1: total=32.00MiB, used=64.00KiB
System, single: total=64.00MiB, used=128.00KiB
Metadata, RAID1: total=17.00GiB, used=16.79GiB
Metadata, single: total=18.00GiB, used=3.72MiB
GlobalReserve, single: total=512.00MiB, used=0.00B
WARNING: Multiple block group profiles detected, see 'man btrfs(5)'.
WARNING: Data: single, raid1
WARNING: Metadata: single, raid1
WARNING: System: single, raid1 |
is there a way to avoid this? i was certain the profiles would be inherited from the device still part of the array.
THX for your input! _________________ DUMM KLICKT GUT. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Zucca Moderator
![Moderator Moderator](/images/ranks/rank-mod.gif)
![](images/avatars/8484577066727ff6a19116.gif)
Joined: 14 Jun 2007 Posts: 3932 Location: Rasi, Finland
|
Posted: Wed Jul 28, 2021 9:57 pm Post subject: |
|
|
Balance basically syncs your data so that in case of raid-1 it ensures you have one copy of each file.
If you remove one drive from the btrfs pool and then balance you will still have intact btrfs pool with one copy redundancy.
If you add one drive to a such pool, you don't need to balance, but you may lose usable space.
If you have lost or removed one drive you need to balance your btrfs or otherwise some files have only single copy. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DawgG l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/141141986446bd852be0016.jpg)
Joined: 17 Sep 2003 Posts: 874
|
Posted: Wed Aug 04, 2021 12:04 pm Post subject: |
|
|
THX for your reply.
Reading the link in my initial post i was under the impression that using the "newer" method btrfs replace (instead of first add and second remove) the filesystem on the new device was created using the same profiles as on the replaced device and the still present device (ie all profiles as raid1 at the time of creation) which it obviously is not (hence the warning quoted in my initial post).
i know i have only one copy if i remove one drive from raid1 but i (kind of) expected btrfs replace to fix that in one go replacing the removed drive (ie w/out mandatory balance after replace). _________________ DUMM KLICKT GUT. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|