From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2C17C433E0 for ; Thu, 4 Feb 2021 20:00:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A725764E35 for ; Thu, 4 Feb 2021 20:00:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239853AbhBDUAP convert rfc822-to-8bit (ORCPT ); Thu, 4 Feb 2021 15:00:15 -0500 Received: from mail.eclipso.de ([217.69.254.104]:51256 "EHLO mail.eclipso.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239931AbhBDT7P (ORCPT ); Thu, 4 Feb 2021 14:59:15 -0500 Received: from mail.eclipso.de (www1.eclipso.de [217.69.254.102]) by mail.eclipso.de with ESMTP id 2C00B9AD for ; Thu, 04 Feb 2021 20:58:30 +0100 (CET) Date: Thu, 04 Feb 2021 20:58:30 +0100 MIME-Version: 1.0 Message-ID: <867a4658d076279f9b8c014835a161b4@mail.eclipso.de> X-Mailer: eclipso / 7.4.0 From: " " Subject: Re: Re: put 2 hard drives in mdadm raid 1 and detect bitrot like btrfs does, what's that called? Reply-To: " " To: Cc: , , In-Reply-To: References: <20210204105457.GI3712@bitfolk.com> <24e578627d205151df16b5aebe4a551e@mail.eclipso.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org --- Ursprüngliche Nachricht --- Von: Goffredo Baroncelli Datum: 04.02.2021 19:13:50 An: Cedric.dewijs@eclipso.eu, Andy Smith Betreff: Re: put 2 hard drives in mdadm raid 1 and detect bitrot like btrfs does, what's that called? [...] > Hey Andy, > > I would rather see performance figures for these setups: > A) btrfs with 2 (or more) hard drives and one SSD in writeback bcache configuration (unsafe against failure of the ssd): > +-----------------------------+ > | btrfs raid 1 /mnt | > +--------------+--------------+ > | /dev/Bcache0 | /dev/Bcache1 | > +--------------+--------------+ > | bcache writeback Cache | > | /dev/sdk1 | > +--------------+--------------+ > | Data | Data | > | /dev/sdv1 | /dev/sdw1 | > +--------------+--------------+ Doing that, you loose the protection of raid1 redundancy: now there is a single point of failure /dev/sdk1. Writeback is even more dangerous... Not really. if bcache is set to read cache, the SSD can die at any moment, without btrfs loosing any data. All written data has gone straight to the hard drives. I have not tried this scenario, but I would be very surprised if reading the data from /mnt is even interrupted for longer than a few seconds if the data cable from the ssd is pulled while data is written from another process. You are correct about writeback cache, if /dev/sdk1 dies, all dirty data is lost, and even worse, both copies of the btrfs data are side by side on only the SSD. (But I already mentioned this in my previous mail: "unsafe against failure of the ssd") Cheers, Cedric --- Take your mailboxes with you. Free, fast and secure Mail & Cloud: https://www.eclipso.eu - Time to change!