From owner-freebsd-stable@FreeBSD.ORG Fri Jan 22 17:17:55 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B324A106576C for ; Fri, 22 Jan 2010 17:17:55 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta04.emeryville.ca.mail.comcast.net (qmta04.emeryville.ca.mail.comcast.net [76.96.30.40]) by mx1.freebsd.org (Postfix) with ESMTP id EA3DE8FC1A for ; Fri, 22 Jan 2010 17:17:53 +0000 (UTC) Received: from omta05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by qmta04.emeryville.ca.mail.comcast.net with comcast id Ydbq1d00E0vp7WLA4hHuYz; Fri, 22 Jan 2010 17:17:54 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by omta05.emeryville.ca.mail.comcast.net with comcast id YhHt1d00F3S48mS8RhHtFZ; Fri, 22 Jan 2010 17:17:54 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 696531E3033; Fri, 22 Jan 2010 09:17:52 -0800 (PST) Date: Fri, 22 Jan 2010 09:17:52 -0800 From: Jeremy Chadwick To: freebsd-stable@freebsd.org Message-ID: <20100122171752.GB75020@icarus.home.lan> References: <4B55D9D4.1000008@FreeBSD.org> <4B597CBB.5040900@omnilan.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B597CBB.5040900@omnilan.de> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: Pack of CAM improvements X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 17:17:55 -0000 On Fri, Jan 22, 2010 at 11:23:55AM +0100, Harald Schmalzbauer wrote: > But I had some questions about zfs raidz states. I think that isn't > a matter of atacam but if I removed one disk, zpool status still > showed me the ada3 device "online". > After reinserting (and proper detection/initialisazion with cam, > ada3 was present again) and zpool clean, it set the devicea as > UNAVAIL sinve I/O errors. > I coudn't get the device into the pool again, no matter what I tried. > Only rebooting the machine helped. Then I could clean and scrub. > > What are the needed steps to provide a reinsterted hard disk to > geom? With the latest patches I don't need to issue any reset/rescan > comman, right? > So it's a zfs problem, right? My mistake in understanding? I can't speak with regards to the new ATA-via-CAM stuff, but with the classic AHCI (meaning ataahci(4)), the procedure I've used reliably for quite some time on Intel ICHx controllers is this: For SATA disks that are purely UFS/UFS2: - Single-user mode might be required here; it varies - Terminate any processes which rely on filesystems on that disk - umount /filesystem - atacontrol detach ataX (where X = channel associated with disk) - Physically remove bad disk - Physically insert new disk - Wait 15 seconds for stuff to settle - atacontrol attach ataX (where X = previous channel detached) - sade / sysinstall / gpart / whatever you like - Restore data... :-) For SATA disks part of a ZFS mirror or raidz[123] pool: - zpool offline - atacontrol detach ataX (where X = channel associated with disk) - Physically remove bad disk - Physically insert new disk - Wait 15 seconds for stuff to settle - atacontrol attach ataX (where X = previous channel detached) - zpool replace - zpool online -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |