From owner-freebsd-stable@FreeBSD.ORG Thu Jan 24 17:40:41 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 15BDCEB1 for ; Thu, 24 Jan 2013 17:40:41 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from qmta14.emeryville.ca.mail.comcast.net (qmta14.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:44:76:96:27:212]) by mx1.freebsd.org (Postfix) with ESMTP id F11B89C1 for ; Thu, 24 Jan 2013 17:40:40 +0000 (UTC) Received: from omta08.emeryville.ca.mail.comcast.net ([76.96.30.12]) by qmta14.emeryville.ca.mail.comcast.net with comcast id rseT1k0050FhH24AEtgg2P; Thu, 24 Jan 2013 17:40:40 +0000 Received: from koitsu.strangled.net ([67.180.84.87]) by omta08.emeryville.ca.mail.comcast.net with comcast id rtgf1k00B1t3BNj8Utgfc8; Thu, 24 Jan 2013 17:40:40 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 18C3573A1C; Thu, 24 Jan 2013 09:40:39 -0800 (PST) Date: Thu, 24 Jan 2013 09:40:39 -0800 From: Jeremy Chadwick To: freebsd-stable@freebsd.org Subject: Re: RFC: Suggesting ZFS "best practices" in FreeBSD Message-ID: <20130124174039.GA35811@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1359049240; bh=wa8KR8Nn/IKMk4jkRvKrsmvl0UfXKJSK1zz+7/bt7h4=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=cZ1N06G2OEKc08+JR1JDjy5x1rfpDGKgGw2UFjKoCVx6ph85gjka1hp+A/Tz1hYfW o4M9HZBfw9Upwer2Z+q04UFGf/PR6MzA1UyQ4DC+0B2e7fE2o8O7M3JSmtoSEh6DnK OMv2hbmcsWrUS2q1gko2TCbRrNcqDVwxIMzgfyKxRGK3uCXMrMrhE62hhocH/j9aYi uFxa4NV7a2xYqvsd88jYWmYKOd2pzQPlVqnWOImlpSpNWKEQttWX6mzKIMRIGC+j/0 EQpO4CzjkjHA7sFqpMuxgDo7QTLxxKnIY2QpfNyf96Mz9cRFZ/SWTfqYZtDqLpLLW6 Gcpb4w0pq1yag== Cc: wblock@wonkity.com, freebsd@deman.com X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2013 17:40:41 -0000 >> #1. Map the physical drive slots to how they show up in FBSD so if a >> disk is removed and the machine is rebooted all the disks after that >> removed one do not have an 'off by one error'. i.e. if you have >> ada0-ada14 and remove ada8 then reboot - normally FBSD skips that >> missing ada8 drive and the next drive (that used to be ada9) is now >> called ada8 and so on... > >How do you do that? If I'm in that situation, I think I could find the >bad drive, or at least the good ones, with diskinfo and the drive serial >number. One suggestion I saw somewhere was to use disk serial numbers >for label values. The term FreeBSD uses for this is called "wiring down" or "wired down", and is documented in CAM(4). It's come up repeatedly over the years but for whatever reason people overlook it or can't find it. Here's how you do it for Intel AHCI (and probably others like AMD), taken directly from my /boot/loader.conf -- # "Wire down" device names (ada[0-5]) to each individual port # on the SATA/AHCI controller. This ensures that if we reboot # with a disk missing, the device names stay the same, and stay # attached to the same SATA/AHCI controller. # http://lists.freebsd.org/pipermail/freebsd-fs/2011-March/011036.html # hint.scbus.0.at="ahcich0" hint.scbus.1.at="ahcich1" hint.scbus.2.at="ahcich2" hint.scbus.3.at="ahcich3" hint.scbus.4.at="ahcich4" hint.scbus.5.at="ahcich5" hint.ada.0.at="scbus0" hint.ada.1.at="scbus1" hint.ada.2.at="scbus2" hint.ada.3.at="scbus3" hint.ada.4.at="scbus4" hint.ada.5.at="scbus5" IMPORTANT: The device names/busses/etc. are going to vary depending on each person's setup, controller, etc.. Proof of this is in a post from Randy Bush, where I helped him off-list with this task and he figured out the remaining bits by himself for his hptrr(4) controller: http://lists.freebsd.org/pipermail/freebsd-fs/2012-June/014522.html You can use labels if you want, but I prefer to just have statically assigned device names regardless of a bay being populated by a disk or not. That's my preference. Other people like labels and that's fine -- I just can't stand the utter mess that is labelling on FreeBSD, sans GPT labels. And finally, touching /boot/device.hints is wrong. Do not do this. Ever. This file is actually "managed" by either mergemaster or installkernel/installworld (I forget which). Use /boot/loader.conf for any hint overrides/adjustments. Leave /boot/device.hints alone. -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |