From owner-freebsd-fs@FreeBSD.ORG Thu Aug 11 17:45:14 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 8D8671065670; Thu, 11 Aug 2011 17:45:14 +0000 (UTC) (envelope-from cracauer@koef.zs64.net) Received: from koef.zs64.net (koef.zs64.net [IPv6:2001:470:1f0b:105e::1e6]) by mx1.freebsd.org (Postfix) with ESMTP id 50AA98FC08; Thu, 11 Aug 2011 17:45:13 +0000 (UTC) Received: from koef.zs64.net (koef.zs64.net [IPv6:2001:470:1f0b:105e::1e6]) by koef.zs64.net (8.14.5/8.14.4) with ESMTP id p7BHjChX046213; Thu, 11 Aug 2011 19:45:12 +0200 (CEST) (envelope-from cracauer@koef.zs64.net) Received: (from cracauer@localhost) by koef.zs64.net (8.14.5/8.14.4/Submit) id p7BHjCNl046207; Thu, 11 Aug 2011 13:45:12 -0400 (EDT) (envelope-from cracauer) Date: Thu, 11 Aug 2011 13:45:12 -0400 From: Martin Cracauer To: Freddie Cash Message-ID: <20110811174512.GA35650@cons.org> References: <20110811160314.GA25076@cons.org> <4E44038F.7000001@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-fs@freebsd.org, Martin Cracauer , Andriy Gapon 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 17:45:14 -0000 Freddie Cash wrote on Thu, Aug 11, 2011 at 09:36:07AM -0700: > On Thu, Aug 11, 2011 at 9:30 AM, Andriy Gapon wrote: > > > on 11/08/2011 19:03 Martin Cracauer said the following: > > > 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. > > > > There's a very big safety net included already: zpool will error out > complaining about mis-matched vdevs if you try to "zpool add" a single disk > to a pool with a mirror vdev. In fact, the user has to add "-f" (force) to > the "zpool add" command in order for this to even happen. IOW, this is user > error, not "lack of safety nets". :) I only issued the -f since the filesystem in there isn't important but anyway. The problem here isn't so much safety net in code. But I don't think the manpage is doing a good job explaining specifically how to replace failed drives in raidz and mirrors, respectively. Ending up doing a drive add to the zpool instead like I did is pretty easy, in particular if you are coming from traditional block device level raid systems. I also don't think that the behavior observed (add device to the pool and make it unremovable even before the filesystem is even mounted) is very intuitive. Sending snapshots, I was hoping for something that would send all snapshots at once (a clone of the complete filesystem). Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/