From owner-freebsd-fs@FreeBSD.ORG Thu Aug 11 16:30:12 2011 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ECBA106566B for ; Thu, 11 Aug 2011 16:30:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id EC6138FC1B for ; Thu, 11 Aug 2011 16:30:11 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA17995; Thu, 11 Aug 2011 19:30:08 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4E44038F.7000001@FreeBSD.org> Date: Thu, 11 Aug 2011 19:30:07 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110705 Thunderbird/5.0 MIME-Version: 1.0 To: Martin Cracauer References: <20110811160314.GA25076@cons.org> In-Reply-To: <20110811160314.GA25076@cons.org> X-Enigmail-Version: 1.2pre Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: ZFS zpool mirror drive replacement confusion X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2011 16:30:12 -0000 on 11/08/2011 19:03 Martin Cracauer said the following: > My computer keeps doing what I say, not what I want :-) > > This zpool with a 2-drive mirror had a dead drive (ad10) which I > removed. After I tried to put ad2 as a replacement drive I ended up > with the drive not in the mirror, it seems to have extended the zpool > (it's size?). > > NAME STATE READ WRITE CKSUM > cbackup3 DEGRADED 0 0 0 > mirror DEGRADED 0 0 0 > ad6 ONLINE 0 0 0 > ad10 REMOVED 0 0 0 > ad2 ONLINE 0 0 11 > > Unfortunately I didn't keep note of the specific command that I used. > > Two questions: > > - Does somebody know offhand what I did and what I should have done > instead to get ad2 into the mirror? You confused 'add' and 'attach' commands or something like that. > - Would there have been a way to remove ad2 from this set? No. > It didn't > let me, saying it can only remove drives from mirror or raid sets. > I think it should have been possible before I mounted the filesystem > in there read-write for the first time after the drive add. This > seems like an easy mistake to make. This has been reported to the ZFS people (upstream) many times, still they didn't add any safety nets. > The array doesn't contain important data, just trying to sort out > things for the future. Read the docs, twice, be careful, take backups before any modifying actions. -- Andriy Gapon