From owner-freebsd-questions@FreeBSD.ORG Tue Nov 24 03:29:01 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0723F10656C7 for ; Tue, 24 Nov 2009 03:29:01 +0000 (UTC) (envelope-from mahlon@martini.nu) Received: from martini.nu (martini.nu [198.145.180.83]) by mx1.freebsd.org (Postfix) with SMTP id CF94A8FC1D for ; Tue, 24 Nov 2009 03:29:00 +0000 (UTC) Received: (qmail 25779 invoked by uid 1000); 24 Nov 2009 03:02:19 -0000 Date: Mon, 23 Nov 2009 19:02:19 -0800 From: "Mahlon E. Smith" To: Derrick Ryalls Message-ID: <20091124030219.GZ23504@martini.nu> Mail-Followup-To: "Mahlon E. Smith" , Derrick Ryalls , Steve Polyack , FreeBSD Questions References: <4AF07493.7050208@comcast.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7tPHY7RFL01rOa8z" Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: 19B8 DDB3 0156 3A03 FA80 8278 C0BE 6BFB 3606 B267 X-Sysinfo: FreeBSD 7.0-RELEASE-p1 i386 User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Steve Polyack , FreeBSD Questions Subject: Re: ZFS disk replacement questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 03:29:01 -0000 --7tPHY7RFL01rOa8z Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 03, 2009, Derrick Ryalls wrote: > On Tue, Nov 3, 2009 at 10:21 AM, Steve Polyack wrote: > > Derrick Ryalls wrote: > >> > >> 1) In the event of a disk failure, how do I trace back the name such > >> as adX to a physical drive in the enclosure? =A0Is there a way to take > >> the drive offline then use atacontrol to spin it down or something so > >> it is easy to identify? > >> > > > > In my opinion you are best off using glabel(8) to give names to the dis= ks. > > =A0This way you can name them in a way that makes sense to you. =A0Addi= tionally, > > when you create the ZFS pool you will use the glabel'd names. =A0This m= eans > > that the pool will still come up properly if something causes your devi= ces > > to be numbered differently (i.e. a drive dies and you happen to reboot = the > > system). >=20 > I believe ZFS does this automatically. Supposedly, if you take a > working set of RAIDZ drives from one machine and put it in another, > ZFS will figure out the drives since they get labelled by ZFS > internally. My question concerns how to identify the physical disk in > question based on the adX or glabel name? Different name in software > is fine, but if the drive fails I want to make sure I pull the correct > drive. This is only true if the metadata on the drives is re-read -- if your pool loses a drive and the device numbers shuffle, your pool will be FAILED on the next boot. You can, however, force the metadata to be re-read via a 'zfs export POOL', and a subsequent 'zfs import POOL'.=20 However, using glabel avoid that step entirely, as ZFS will always see the 'right' devices in the right places, regardless of where they are physically. -Mahlon -- Mahlon E. Smith =20 http://www.martini.nu/contact.html --7tPHY7RFL01rOa8z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFLC0y71bsjBDapbeMRAuD/AJ4nZbqQx6f+yaqeJnrXBT4+1EUIWgCfWCZi 2Fe5OIEm3a5p+PxH8ihu5u8= =QOKy -----END PGP SIGNATURE----- --7tPHY7RFL01rOa8z--