Linux-BTRFS Archive on lore.kernel.org
 help / color / Atom feed
From: Adam Borowski <kilobyte@angband.pl>
To: Eric Wong <e@80x24.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: raid1 with several old drives and a big new one
Date: Fri, 31 Jul 2020 18:13:07 +0200
Message-ID: <20200731161307.GA31148@angband.pl> (raw)
In-Reply-To: <20200731001652.GA28434@dcvr>

On Fri, Jul 31, 2020 at 12:16:52AM +0000, Eric Wong wrote:
> Say I have three ancient 2TB HDDs and one new 6TB HDD, is there
> a way I can ensure one raid1 copy of the data stays on the new
> 6TB HDD?
> 
> I expect the 2TB HDDs to fail sooner than the 6TB HDD given
> their age (>5 years).

While there's no good way to do so in general, in your case, there's no way
for any new block group to be allocated without the big disk.

Btrfs' allocation algorithm is: always pick the disk with most free space
left.  Besides being simple, this guarantees optimally utilizing available
space.

And, for 2+2+2+6, no scheme that doesn't waste space could possibly place
raid1 copies without having one on the biggest disk.

Thus, all you need is to balance once.

> The devid balance filter only affects data which already exists
> on the device, so that isn't suitable for this, right?

Yeah, balance affects existing data, but doesn't have a lingering effect on
new allocations.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁
⢿⡄⠘⠷⠚⠋⠀ It's time to migrate your Imaginary Protocol from version 4i to 6i.
⠈⠳⣄⠀⠀⠀⠀

  parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31  0:16 Eric Wong
2020-07-31  2:57 ` Chris Murphy
2020-07-31  3:22   ` Eric Wong
2020-07-31  3:35     ` Chris Murphy
2020-08-01  9:05   ` Roman Mamedov
2020-07-31  8:29 ` Alberto Bursi
2020-07-31 10:06   ` Eric Wong
2020-07-31 16:13 ` Adam Borowski [this message]
2020-08-01  3:40   ` Zygo Blaxell

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=20200731161307.GA31148@angband.pl \
    --to=kilobyte@angband.pl \
    --cc=e@80x24.org \
    --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

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org
	public-inbox-index linux-btrfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git