From owner-freebsd-hackers@freebsd.org Mon Feb 27 00:09:20 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82463CEEB0E for ; Mon, 27 Feb 2017 00:09:20 +0000 (UTC) (envelope-from f0andrey@gmail.com) Received: from mail-qk0-x236.google.com (mail-qk0-x236.google.com [IPv6:2607:f8b0:400d:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 449556CF for ; Mon, 27 Feb 2017 00:09:20 +0000 (UTC) (envelope-from f0andrey@gmail.com) Received: by mail-qk0-x236.google.com with SMTP id x71so74874008qkb.3 for ; Sun, 26 Feb 2017 16:09:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=q962S6GUuDEvpasIUbWUg0I7r4z6kfyEX1dpGxqfOZ8=; b=GBvgbUHpIMCveSfATsy7WmyPp/24eEXKLqAGVC3IXrWtITkOWFe/tVNzlV1yfegcAM 2BOSCO5WsfjI8JPZbNA+6QAZp0Q9UObIvcCQLBTk88xOlfD2L2C3d2Kp2yb+sTdp+4tI WWUHsVArgG0CZF7ZjGBqgQANb+397QgLX1YJMjOb5eHUgNnL3WrpQ9btzXXuCZX52AS+ WfTAbMONFOhQnAlO6fk8iXUpe5lVEGtjkw6ULMucP0UfWFmyh0yxShXWmqpfKzj5TvhW B4V7P9CeQNH+GVsPtsTrj5xb+bzCgZc1BA8D25uEfCzysHbuYsph4TzzOtKYDpQoG2hH aF+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=q962S6GUuDEvpasIUbWUg0I7r4z6kfyEX1dpGxqfOZ8=; b=iDuL1Kn4MrTZqNfysjXkL7Lez1Mh0sCoO1c27OZ+zRGng/6KkFd7RLx6cET79LmHva hqmrSBOMqgItiKCUbFXTr3f95kDPVtFmOBrLGeFKLmAG4M4croumheL7nJy0gOVSkFIt 3bgT8puS0fPqYZuW48gx3wR4tqiDrjTVvttU7AC6lAalG1zXGDiQ9MBhDoaOD/lLrfjG y3pfBUmjCLwF6/s+owZKB4jv3yCw7BtlYuj3gLNoIneVrhqSNCL5oACcjblWYzwM2+zY rL5BP8hoiph5bVl9ubRjLusztHWMjK9N9wXSCwkCj2hgSjlfmkhFrGFaPjAQZpWa+KK7 B64A== X-Gm-Message-State: AMke39lgL+btJ2cVrzPpc9mc1c1m38XIsl8+towG0XlB59powgFO6DZgMWBzj/bAfMPff5SShMRKci+CNWpqmA== X-Received: by 10.55.103.10 with SMTP id b10mr546640qkc.207.1488154159407; Sun, 26 Feb 2017 16:09:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.184.131 with HTTP; Sun, 26 Feb 2017 16:09:18 -0800 (PST) In-Reply-To: References: From: Andrey Fesenko Date: Mon, 27 Feb 2017 03:09:18 +0300 Message-ID: Subject: Re: ZFS should prefer the most specific... or something. To: Zaphod Beeblebrox Cc: FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Feb 2017 00:09:20 -0000 On Mon, Feb 27, 2017 at 2:31 AM, Zaphod Beeblebrox wrote: > So, my experience is that I added two drives (that showed up as ada0 and > ada1) ... something odd with the raid card added a da0 ... which is > unreadable ... seems to be a bogon. > > ... and ZFS, in it's infinite wisdom changes my nice, neat da0s2a zfs to > diskid/s2a. > > ... this is doubly bad, because then the /dev/da0s1a cannot mount as swap. > > I realize that this is can be somewhat fixed for non-root zfs with > import/export, but for root ZFS ... you're stuck. > > Can we have ZFS prefer the shortest (rather than longest)? Can we have it > prefer labels, if they exist (have a priority field in the different types > of geom ... an order in which they are tasted)? > > The current situation has been annoying multiple distinct times. "A disk can be specified by a full path to the device or the geom(4) provider name" see zpool(8) For example gpt lables gpart add -a 4k -t freebsd-zfs -l local0 da0 ... % zpool status localz1 NAME STATE READ WRITE CKSUM localz1 ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 gpt/local1 ONLINE 0 0 0 gpt/local2 ONLINE 0 0 0 gpt/local0 ONLINE 0 0 0 logs gpt/l2arc ONLINE 0 0 0 cache gpt/cache ONLINE 0 0 0 Label or disk name may be changed if need after export/import (If I remember it right)