From owner-freebsd-geom@FreeBSD.ORG Fri Jul 10 16:38:04 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE026106564A; Fri, 10 Jul 2009 16:38:04 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout026.mac.com (asmtpout026.mac.com [17.148.16.101]) by mx1.freebsd.org (Postfix) with ESMTP id A94348FC1C; Fri, 10 Jul 2009 16:38:04 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp026.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KMK008NYRIIAD80@asmtp026.mac.com>; Fri, 10 Jul 2009 09:37:31 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <20090709222420.GE2438@garage.freebsd.pl> Date: Fri, 10 Jul 2009 09:37:30 -0700 Message-id: <0903FECF-3D0D-430E-9E93-C6DC00CA1BC5@mac.com> References: <20090709200102.GA2438@garage.freebsd.pl> <20090709222420.GE2438@garage.freebsd.pl> To: Pawel Jakub Dawidek X-Mailer: Apple Mail (2.1068) Cc: freebsd-geom@freebsd.org Subject: Re: glabel and real disk IDs X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 16:38:05 -0000 On Jul 9, 2009, at 3:24 PM, Pawel Jakub Dawidek wrote: >> I see ZFS getting confused when disks are shuffled around. >> The confusion is the result of having device paths stored >> in the ZFS label match the device name of some other vdev >> that part of the same pool. >> >> Replacing a device with itself doesn't help, because ZFS >> complains that the vdev is part of an active pool in that >> case. It seems that only labels will work here... > > Solaris is using device names stored in ZFS label and if this is not > the > drive it was looking for, it is doing ID-to-path translation to find > new > path name. On FreeBSD on the other hand (after upgrade to v13) I > gave up > doing similar thing because disk IDs weren't available from all disk > device drivers (I implemented it for ATA and I received no help with > other drivers). Currently the idea is to just go through all GEOM > providers looking for proper ZFS metadata (think of it as manual > tasting), so even if device name changes, ZFS should be able to locate > it. If there are still problems locating the disk, there simply > might be > a bug in the code of some sort. Disks are found correctly, it's just that ZFS' internal state is messed up. It uses both the device special file name and the stored vdev path and as such can end up with multiple VDEVs of the same name. As such, some VDEVs are marked as corrupted/faulted. I can reproduce it if you're interested. FYI, -- Marcel Moolenaar xcllnt@mac.com