From owner-freebsd-stable@FreeBSD.ORG Wed Nov 19 16:01:52 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAE34594 for ; Wed, 19 Nov 2014 16:01:52 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C69FBBC for ; Wed, 19 Nov 2014 16:01:52 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id r20so9377804wiv.0 for ; Wed, 19 Nov 2014 08:01:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=zu2PIgl6BqognpY+LnotrJUyZUPe9DwDSmU/PrAoFwk=; b=pOF/D/+eB4qC49B+Da+0PLzSppDb+UvS9LydrofnziDIN1zp6qB5Qk0y3j9uC5zvuc AHdcsTc2BvTGTqTEXAgGS52oDfGp9c9YjnbDkzTEks/TQneEe9hEfF64cmVlpN4Y4RNd PFYLtOdyeRzNKmZEyPHOl4CHznW4TulrPY9+GKUIe+8kz5oGiNozTC0kB9rAzz0o0Xwu fFh4FE3ONaCDqvZA8sqqPMVzsOZZzxzg5x1nrs+YTeUwJyRcMXuz+oLf72votgnoieeI AJyUxkzs4jTAuei82++ocHsNjbEDciQmIv3PbmzuSAy8WVM27xVM5SkAhtABINv3P2qg Q70g== MIME-Version: 1.0 X-Received: by 10.180.90.197 with SMTP id by5mr7108318wib.50.1416412910638; Wed, 19 Nov 2014 08:01:50 -0800 (PST) Sender: asomers@gmail.com Received: by 10.194.156.229 with HTTP; Wed, 19 Nov 2014 08:01:50 -0800 (PST) In-Reply-To: References: Date: Wed, 19 Nov 2014 09:01:50 -0700 X-Google-Sender-Auth: qvX9TovHTbQwO9u7InB9ji7noMA Message-ID: Subject: Re: 10.1 geom "diskid" From: Alan Somers To: "Patrick M. Hausen" Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-stable@freebsd.org List" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 16:01:52 -0000 On Wed, Nov 19, 2014 at 8:40 AM, Patrick M. Hausen wrote: > Hi, all, > > next question, sorry. I just created a fresh 10.1 installation > with ZFS. With the last reboot after adding dedicated SSD > based l2arc and zil, the underlying devices are referred to > by "diskid" instead of the GPT labels I have first been using: > > NAME STATE READ WRITE CKSUM > zroot ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > gpt/disk0 ONLINE 0 0 0 > gpt/disk1 ONLINE 0 0 0 > logs > diskid/DISK-BTTV334403R7200GGNp2 ONLINE 0 0 0 > cache > diskid/DISK-BTTV334403R7200GGNp1 ONLINE 0 0 0 > > I can live with that, but I do not understand why the ada2 device > changed from gpt/* to diskid/* while the others did not? > > /dev/gpt entries are not even present for ada2, neither are ada2p? > > At least the system could try to be consistent ;-) When ZFS imports a pool, it tries to open each vdev by name. If it can't find the vdev's name, or if that devname now refers to some other provider, then ZFS searches through every geom provider to find the ones with the right label. Sometimes it finds /dev/da* first, sometimes it finds /dev/gpt/* first, and sometimes it finds /dev/diskid/* first. That's why it seems inconsistent. If you want to force some consistency, you can set these tunables in /boot/loader.conf.local. That way ZFS will only be able to use the /dev/da* and /dev/ada* devnames. kern.geom.label.disk_ident.enable=0 kern.geom.label.gptid.enable=0 Or, if you specify the /dev/diskid/* or /dev/gpt/* devnames in the zpool create command, then those devnames should get written to the label, and ZFS will always use them when it imports a pool. At least, I think that it will. I haven't tested it myself. -Alan