From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f181.google.com ([209.85.213.181]:38348 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753230AbbJNNMq (ORCPT ); Wed, 14 Oct 2015 09:12:46 -0400 Received: by igsu6 with SMTP id u6so16140245igs.1 for ; Wed, 14 Oct 2015 06:12:45 -0700 (PDT) Subject: Re: System completely unresponsive after `btrfs balance start -dconvert=raid0 /` and `btrfs fi show /` To: Hugo Mills , Duncan <1i5t5.duncan@cox.net>, linux-btrfs@vger.kernel.org References: <20151014091325.GL25907@carfax.org.uk> From: Austin S Hemmelgarn Message-ID: <561E54BD.4000402@gmail.com> Date: Wed, 14 Oct 2015 09:12:29 -0400 MIME-Version: 1.0 In-Reply-To: <20151014091325.GL25907@carfax.org.uk> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms090409020806040502090908" Sender: linux-btrfs-owner@vger.kernel.org List-ID: This is a cryptographically signed message in MIME format. --------------ms090409020806040502090908 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2015-10-14 05:13, Hugo Mills wrote: > On Wed, Oct 14, 2015 at 05:08:17AM +0000, Duncan wrote: >> Carmine Paolino posted on Tue, 13 Oct 2015 23:21:49 +0200 as excerpted= : >> >>> I have an home server with 3 hard drives that I added to the same btr= fs >>> filesystem. Several hours ago I run `btrfs balance start -dconvert=3D= raid0 >>> /` and as soon as I run `btrfs fi show /` I lost my ssh connection to= >>> the machine. The machine is still on, but it doesn=E2=80=99t even res= pond to >>> ping[. ...] >>> >>> (I have a 250gb internal hard drive, a 120gb usb 2.0 one and a 2TB us= b >>> 2.0 one so the transfer speeds are pretty low) >> >> I won't attempt to answer the primary question[1] directly, but can po= int >> out that in many cases, USB-connected devices simply don't have a stab= le >> enough connection to work reliably in a multi-device btrfs. There's >> several possibilities for failure, including flaky connections (someti= mes >> assisted by cats or kids), unstable USB host port drivers, and unstabl= e >> USB/ATA translators. A number of folks have reported problems with su= ch >> filesystems with devices connected over USB, that simply disappear if >> they direct-connect the exact same devices to a proper SATA port. The= >> problem seems to be /dramatically/ worse with USB connected devices, t= han >> it is with, for instance, PCIE-based SATA expansion cards. >> >> Single-device btrfs with USB-attached devices seem to work rather bett= er, >> because at least in that case, if the connection is flaky, the entire >> filesystem appears and disappears at once, and btrfs' COW, atomic-comm= it >> and data-integrity features, kick in to help deal with the connection'= s >> instability. >> >> Arguably, a two-device raid1 (both data/metadata, with metadata includ= ing >> system) should work reasonably well too, as long as scrubs are done af= ter >> reconnection when there's trouble with one of the pair, because in tha= t >> case, all data appears on both devices, but single and raid0 modes are= >> likely to have severe issues in that sort of environment, because even= >> temporary disconnection of a single device means loss of access to som= e >> data/metadata on the filesystem. Raid10, 3+-device-raid1, and raid5/6= , >> are more complex situations. They should survive loss of at least one= >> device, but keeping the filesystem healthy in the presence of unstable= >> connections is... complex enough I'd hate to be the one having to deal= >> with it, which means I can't recommend it to others, either. > > Note also that RAID-0 is a poor choice for this configuration, > because you'll only get 640 GB usable space out of it. With single, > you'll get the full sum of 2370 GB usable. With RAID-1, you'll have > 320 GB usable. The low figures for the RAID-0 and -1 come from the > fact that you've got two small devices, and that both RAID-0 and > RAID-1 have a minimum of two devices per block group. You can play > around with the configurations at http://carfax.org.uk/btrfs-usage > > But I second Duncan's advice about not using USB. It's really not a= > reliable configuration with btrfs. I'd also second that statement, but go even further and say to not use=20 USB for anything except backups and transferring data between computers=20 unless you have absolutely no other option, and be wary of using any=20 externally connected storage device for other use cases (I've seen=20 similar issues with eSATA drives and BTRFS, and have heard of such=20 issues with some Thunderbolt connected storage devices). --------------ms090409020806040502090908 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG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