From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-31.italiaonline.it ([212.48.25.159]:42787 "EHLO libero.it" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755212AbcAJQyM (ORCPT ); Sun, 10 Jan 2016 11:54:12 -0500 Reply-To: kreijack@inwind.it Subject: Re: evidence of persistent state, despite device disconnects References: To: Duncan <1i5t5.duncan@cox.net>, linux-btrfs@vger.kernel.org From: Goffredo Baroncelli Message-ID: <56928CB1.1070104@inwind.it> Date: Sun, 10 Jan 2016 17:54:09 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 2016-01-09 11:55, Duncan wrote: > (a minimum of two devices are required to create raid1 chunks, since two > copies are required and they can't be on the same device). I think that this is the problem: BTRFS should allocate a new chunk as RAID1, even if only one device is available. It is already capable to use a RAID1 chunk in degraded mode, so it shouldn't be so difficult to create new chunk RAID1 when only a one disk is available. Anyway I agree with Chris about the fact that btrfs sometime gives incorrect information about the devices. In the past I proposed to abandon the current model where the device are "per-registered" before the mount command asynchronously. I wrote a mount helper which does a scan at the mount time [1]; this would reduce the window time where a device disappearing could cause confusion. BR G.Baroncelli [1] https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg39429.html -- gpg @keyserver.linux.it: Goffredo Baroncelli Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5