From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f180.google.com ([209.85.223.180]:35431 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbbKLMrY (ORCPT ); Thu, 12 Nov 2015 07:47:24 -0500 Received: by ioc74 with SMTP id 74so63390423ioc.2 for ; Thu, 12 Nov 2015 04:47:24 -0800 (PST) Subject: Re: Potential to loose data in case of disk failure To: Sean Greenslade , Jim Murphy References: <20151111202403.GA19245@wheatley.student.rit.edu> Cc: linux-btrfs@vger.kernel.org From: Austin S Hemmelgarn Message-ID: <56448A54.9020404@gmail.com> Date: Thu, 12 Nov 2015 07:47:16 -0500 MIME-Version: 1.0 In-Reply-To: <20151111202403.GA19245@wheatley.student.rit.edu> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms030205020904040303050903" Sender: linux-btrfs-owner@vger.kernel.org List-ID: This is a cryptographically signed message in MIME format. --------------ms030205020904040303050903 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable On 2015-11-11 15:24, Sean Greenslade wrote: > On Wed, Nov 11, 2015 at 11:30:57AM -0600, Jim Murphy wrote: >> Hi all, >> >> What am I missing or misunderstanding? I have a newly >> purchased laptop I want/need to multi boot different OSs >> on. As a result after partitioning I have ended up with two >> partitions on each of the two internal drives(sda3, sda8, >> sdb3 and sdb8). FWIW, sda3 and sdb3 are the same size >> and sda8 and sdb8 are the same size. As an end result >> I want one btrfs raid1 filesystem. For lack of better terms, >> sda3 and sda8 "concatenated" together, sdb3 and sdb8 >> "concatenated" together and then mirroring "sda" to "sdb" >> using only btrfs. So far have found no use-case to cover >> this. >> >> If I create a raid1 btrfs volume using all 4 "devices" as I >> understand it I would loose data if I were to loose a drive >> because two mirror possibilities would be: >> >> sda3 mirrored to sda8 >> sdb3 mirrored to sdb8 >> >> Is what I want to do possible without using MD-RAID and/or >> LVM? If so would someone point me to the documentation >> I missed. For whatever reason, I don't want to believe that >> this can't be done. I want to believe that the code in btrfs >> is smart enough to know that sda3 and sda8 are on the same >> drive and would not try to mirror data between them except in >> a test setup. I hope I just missed some documentation, >> somewhere. >> >> Thanks in advance for your help. And last but not least, >> thanks to all for your work on btrfs. >> >> Jim > > That's a pretty unusual setup, so I'm not surprised there's no quick an= d > easy answer. The best solution in my opinion would be to shuffle your > partitions around and combine sda3 and sda8 into a single partition. > There's generally no reason to present btrfs with two different > partitions on the same disk. > > If there's something that prevents you from doing that, you may be able= > to use RAID10 or RAID6 somehow. I'm not really sure, though, so I'll > defer to others on the list for implementation details. RAID10 has the same issue. Assume you have 1 block. This gets stored=20 as 2 copies, each with 2 stripes, with the stripes split symmetrically.=20 For this, call the first half of the first copy 1a, the second half=20 1b, and likewise for 2a and 2b with the second copy. 1a and 2a have=20 identical contents, and 1b and 2b have identical contents. It is fully=20 possible that you will end up with this block striped such that 1a and=20 2a are on one disk, and 1b and 2b on the other. Based on this, losing=20 one disk would mean losing half the block, which would mean based on how = BTRFS works that you would lose the whole block (because neither copy=20 would be complete). --------------ms030205020904040303050903 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 Brgwgga0MIIEnKADAgECAgMRLfgwDQYJKoZIhvcNAQENBQAweTEQMA4GA1UEChMHUm9vdCBD QTEeMBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNp Z25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2VydC5vcmcwHhcN MTUwOTIxMTEzNTEzWhcNMTYwMzE5MTEzNTEzWjBjMRgwFgYDVQQDEw9DQWNlcnQgV29UIFVz ZXIxIzAhBgkqhkiG9w0BCQ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