From owner-freebsd-hardware@FreeBSD.ORG Mon Oct 20 17:25:17 2008 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B5E6106566C for ; Mon, 20 Oct 2008 17:25:17 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA10.westchester.pa.mail.comcast.net (qmta10.westchester.pa.mail.comcast.net [76.96.62.17]) by mx1.freebsd.org (Postfix) with ESMTP id DFDE48FC1B for ; Mon, 20 Oct 2008 17:25:16 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA06.westchester.pa.mail.comcast.net ([76.96.62.51]) by QMTA10.westchester.pa.mail.comcast.net with comcast id V4XC1a01L16LCl05A5RGWo; Mon, 20 Oct 2008 17:25:16 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA06.westchester.pa.mail.comcast.net with comcast id V5RF1a0092P6wsM3S5RFJp; Mon, 20 Oct 2008 17:25:16 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=TdDQ7-bBZVtic3zKy8MA:9 a=TcUqXfwZxtl4RXSYE2NPckTuLWUA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 1EFE6C9432; Mon, 20 Oct 2008 10:25:15 -0700 (PDT) Date: Mon, 20 Oct 2008 10:25:15 -0700 From: Jeremy Chadwick To: Steve Franks Message-ID: <20081020172515.GA8705@icarus.home.lan> References: <539c60b90810201018v455513a0tdc97d7465e6623c3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <539c60b90810201018v455513a0tdc97d7465e6623c3@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hardware@freebsd.org Subject: Re: sata hotswap on Intel ICH7 X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2008 17:25:17 -0000 On Mon, Oct 20, 2008 at 10:18:50AM -0700, Steve Franks wrote: > Just curious if this works, what I need to do, etc, good/bad > experiences... Since I'm actually talking about internal drives, does > cabling matter, is the power supposed to mate before/after data, etc? Hot-swapping on SATA requires an actual hot-swap-capable SATA backplane. You *cannot* just "yank a disk out of a PC" by removing the SATA data or power cable. It also requires that you be using SATA in "Enhanced" mode, or under AHCI. Using SATA in "Emulation" or "Compatible" mode (e.g. a 2-channel SATA controller will assign disks as ata0-master and ata0-slave) will not work how you expect. AHCI is preferred, if available. Assuming you meet these criteria, all you need to do on FreeBSD is: - Unmount any filesystems using the disk (you may need to shut down or kill off processes using files on those filesystems before you can unmount). If you forget to do this, you will panic the box. - atacontrol list, and determine what channel to detach (E.g. ata0) - atacontrol detach - Kernel should show the disk disappearing. - Remove disk from machine, replace with new disk. - Wait for disk to spin up (sometimes the drive LEDs will be lit; wait for them to turn off) - atacontrol attach And that's all. Note that there are known problems with this when using BIOS-level RAID methods such as Intel MatrixRAID, so please do not use those. > Doesn't seem to be much on the subject in the handbook or man > atacontrol. You can file a PR to get this added, if you'd like. :-) > I assume we've had scsi hotswapping for quite some time, right? Correct, but it requires similar hardware as above. SCA drives, for example, are hot-swappable, while yanking a drive off a LVD cable will probably not do what you expect. camcontrol(8) is the utility you want to use for all that. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |