Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

how to avoid balance after btrfs replace in raid ?

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
DawgG
l33t
l33t
User avatar
Posts: 880
Joined: Wed Sep 17, 2003 12:31 pm

how to avoid balance after btrfs replace in raid ?

  • Quote

Post by DawgG » Wed Jul 28, 2021 2:21 pm

i just replaced some old devices in a couple of btrfs-raid-1-systems using the method https://btrfs.wiki.kernel.org/index.php ... le_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: Select all

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.
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4693
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Wed Jul 28, 2021 9:57 pm

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 :..

Code: Select all

init=/sbin/openrc-init
-systemd -logind -elogind seatd
I am NaN! I am a man!
Top
DawgG
l33t
l33t
User avatar
Posts: 880
Joined: Wed Sep 17, 2003 12:31 pm

  • Quote

Post by DawgG » Wed Aug 04, 2021 12:04 pm

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.
Top
Post Reply

3 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic