From owner-freebsd-fs@FreeBSD.ORG Wed Oct 24 15:58:18 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7918416A417 for ; Wed, 24 Oct 2007 15:58:18 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id DCD5213C491 for ; Wed, 24 Oct 2007 15:58:17 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 4267C45F66; Wed, 24 Oct 2007 17:58:07 +0200 (CEST) Received: from localhost (public-gprs20687.centertel.pl [87.96.80.207]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 8507A456AB; Wed, 24 Oct 2007 17:57:52 +0200 (CEST) Date: Wed, 24 Oct 2007 17:57:23 +0200 From: Pawel Jakub Dawidek To: Attila Nagy Message-ID: <20071024155723.GA1431@garage.freebsd.pl> References: <471F5B46.9050106@fsn.hu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <471F5B46.9050106@fsn.hu> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@freebsd.org Subject: Re: ZFS and disk naming change (ex. da0->da4) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2007 15:58:18 -0000 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 24, 2007 at 04:48:38PM +0200, Attila Nagy wrote: > Hello, >=20 > I have an experimental (but that does not mean, I wouldn't like to get=20 > my data back :) zpool, which was created with something like this: > zpool create people raidz2 /dev/da0 /dev/da3 /dev/da4, etc >=20 > The problem is those device names have been changed during the next=20 > reboot (the cause of this is irrelevant, but mainly because some of them= =20 > were not attached at the original boot, just later, so at the next=20 > reboot the disks came up in a different order), so now I have: > zpool status > pool: people > state: UNAVAIL > status: One or more devices could not be opened. There are insufficient > replicas for the pool to continue functioning. > action: Attach the missing device and online it using 'zpool online'. > see: http://www.sun.com/msg/ZFS-8000-D3 > scrub: none requested > config: >=20 > NAME STATE READ WRITE CKSUM > people UNAVAIL 0 0 0 insufficient replicas > raidz2 UNAVAIL 0 0 0 insufficient replicas > da0 UNAVAIL 0 0 0 cannot open > da3 ONLINE 0 0 0 > da4 FAULTED 0 0 0 corrupted data > da5 FAULTED 0 0 0 corrupted data > da6 FAULTED 0 0 0 corrupted data > da7 FAULTED 0 0 0 corrupted data > da8 FAULTED 0 0 0 corrupted data > da9 FAULTED 0 0 0 corrupted data >=20 > (it seems da3 is still da3 :) >=20 > My question is: what now? Is it possible to regain the pool, or is it=20 > totally busted now? I am not sure that I can figure out which device is= =20 > which now... >=20 > I've only played with ZFS on Solaris with FC targets, and there I've=20 > never faced this problem, because of the static naming. ZFS caches components names in /boot/zfs/zpool.cache. You may remove this file and import the pool again. ZFS can handle name changes, but currently only with ATA disks. It can find disk using it's ID. I've a patch for SCSI disks, but it's probably not entirely correct: http://people.freebsd.org/~pjd/patches/scsi_da_ident.patch We need some SCSI guru to implement it properly. > ps: I guess next time I will use glabel -I love that- to provide base=20 > devices... Yes, glabel seems like a good work-around for now. In some cases we will never be able to provide disk's ID, eg. for USB pen-drives, etc. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHH2tjForvXbEpPzQRAhTtAKCBM26apew1ECBHJotDvgfiQHAMEgCeMgtx diMJTeIzFTVXcfSHVlX3/KE= =8SOP -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--