From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f174.google.com ([209.85.223.174]:34215 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752050AbbHERcz (ORCPT ); Wed, 5 Aug 2015 13:32:55 -0400 Received: by ioea135 with SMTP id a135so56501026ioe.1 for ; Wed, 05 Aug 2015 10:32:54 -0700 (PDT) Subject: Re: RAID1: system stability To: Russell Coker , Chris Murphy , linux-btrfs References: <556457b8.e72b980a.ee08.ffffce60@mx.google.com> <201507222100.22471.russell@coker.com.au> From: Austin S Hemmelgarn Message-ID: <55C248B9.20003@gmail.com> Date: Wed, 5 Aug 2015 13:32:41 -0400 MIME-Version: 1.0 In-Reply-To: <201507222100.22471.russell@coker.com.au> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms070402010403040405030204" Sender: linux-btrfs-owner@vger.kernel.org List-ID: This is a cryptographically signed message in MIME format. --------------ms070402010403040405030204 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2015-07-22 07:00, Russell Coker wrote: > On Tue, 23 Jun 2015 02:52:43 AM Chris Murphy wrote: >> OK I actually don't know what the intended block layer behavior is >> when unplugging a device, if it is supposed to vanish, or change state= >> somehow so that thing that depend on it can know it's "missing" or >> what. So the question here is, is this working as intended? If the >> layer Btrfs depends on isn't working as intended, then Btrfs is >> probably going to do wild and crazy things. And I don't know that the >> part of the block layer Btrfs depends on for this is the same (or >> different) as what the md driver depends on. > > I disagree with that statement. BTRFS should be expected to not do wil= d and > crazy things regardless of what happens with block devices. I would generally agree with this, although we really shouldn't be doing = things like trying to handle hardware failures without user=20 intervention. If a block device disappears from under us, we should=20 throw a warning and if it's the last device in the FS, kill anything=20 that is trying to read or write to that FS. At the very least, we=20 should try to avoid hanging or panicking the system if all of the=20 devices in an FS disappear out from under us. > > A BTRFS RAID-1/5/6 array should cope with a single disk failing or retu= rning > any manner of corrupted data and should not lose data or panic the kern= el. It's debatable however whether the array should go read-only when=20 degraded. MD/DM RAID (at least, AFAIK) and most hardware RAID=20 controllers I've seen will still accept writes to degraded arrays,=20 although there are arguments for forcing it read-only as well. Personally, I think that should be controlled by a mount option, so the=20 sysadmin can decide, as it really is a policy decision. > > A BTRFS RAID-0 or single disk setup should cope with a disk giving erro= rs by > mounting read-only or failing all operations on the filesystem. It sho= uld not > affect any other filesystem or have any significant impact on the syste= m unless > it's the root filesystem. Or some other critical filesystem (there are still people who put /usr=20 and/or /var on separate filesystems). Ideally, I'd love to see some=20 some kind of warning from the kernel if a filesystem gets mounted that=20 has the metadata/system profile set to raid0 (and possibly have some of=20 the tools spit out such a warning also). --------------ms070402010403040405030204 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC Brgwgga0MIIEnKADAgECAgMQblUwDQYJKoZIhvcNAQENBQAweTEQMA4GA1UEChMHUm9vdCBD QTEeMBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNp Z25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2VydC5vcmcwHhcN MTUwMzI1MTkzNDM4WhcNMTUwOTIxMTkzNDM4WjBjMRgwFgYDVQQDEw9DQWNlcnQgV29UIFVz ZXIxIzAhBgkqhkiG9w0BCQEWFGFoZmVycm9pbjdAZ21haWwuY29tMSIwIAYJKoZIhvcNAQkB FhNhaGVtbWVsZ0BvaGlvZ3QuY29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA nQ/81tq0QBQi5w316VsVNfjg6kVVIMx760TuwA1MUaNQgQ3NyUl+UyFtjhpkNwwChjgAqfGd LIMTHAdObcwGfz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