From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 03:52:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69BAF1065670 for ; Tue, 2 Mar 2010 03:52:38 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id DA2338FC1F for ; Tue, 2 Mar 2010 03:52:36 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id o223qXrP068939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Mar 2010 21:52:33 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.3) with ESMTP id o223qWoI007316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Mar 2010 21:52:33 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.3/Submit) id o223jJF8084792; Mon, 1 Mar 2010 21:45:19 -0600 (CST) (envelope-from dan) Date: Mon, 1 Mar 2010 21:45:19 -0600 From: Dan Nelson To: Aryeh Friedman Message-ID: <20100302034519.GW70798@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 7.2-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.95.3 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Mon, 01 Mar 2010 21:52:33 -0600 (CST) X-Scanned-By: MIMEDefang 2.45 Cc: freebsd-hackers@freebsd.org, Garrett McNeill Subject: Re: unable to offline a failing drive in a zfs RAIDZ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 03:52:38 -0000 In the last episode (Mar 01), Aryeh Friedman said: > I have a raidz setup as per the handbook but when I attempt to "offline" a > failing drive it will not let me: > > kate# zpool status -c > invalid option 'c' > usage: > status [-vx] [pool] ... > kate# zpool status -v > pool: storage > state: ONLINE > scrub: resilver completed with 0 errors on Mon Mar 1 17:36:48 2010 > config: > > NAME STATE READ WRITE CKSUM > storage ONLINE 0 0 0 > raidz1 ONLINE 0 0 0 > ad7 ONLINE 0 0 0 > ad8 ONLINE 0 0 0 > ad9 ONLINE 0 0 0 > ad10 ONLINE 0 0 0 > ad12 ONLINE 0 0 0 > > errors: No known data errors > kate# zpool offline storage ad12 > cannot offline ad12: no valid replicas What version of FreeBSD are you running? This looks like a known bug. It originally worked for mirrors but not RAIDZ vdevs - "zpool offline is a bit too conservative": http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=2171359 , and works for me on a 7-stable kernel: (root@studio) /root># uname -a FreeBSD studio.evoy.net 7.3-PRERELEASE FreeBSD 7.3-PRERELEASE #53: Tue Feb 2 17:19:46 CST 2010 zsh@studio.evoy.net:/usr/src-7/sys/amd64/compile/STUDIO amd64 (root@studio) /root># mdconfig -a -t swap -s 1g ; mdconfig -a -t swap -s 1g ; mdconfig -a -t swap -s 1g md1 md2 md3 (root@studio) /root># zpool create dummy raidz md1 md2 md3 (root@studio) /root># zpool offline dummy md2 (root@studio) /root># zpool status dummy pool: dummy state: DEGRADED status: One or more devices has been taken offline by the administrator. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Online the device using 'zpool online' or replace the device with 'zpool replace'. scrub: none requested config: NAME STATE READ WRITE CKSUM dummy DEGRADED 0 0 0 raidz1 DEGRADED 0 0 0 md1 ONLINE 0 0 0 md2 OFFLINE 0 0 0 md3 ONLINE 0 0 0 -- Dan Nelson dnelson@allantgroup.com