From nobody Mon Aug 9 12:35:25 2021 X-Original-To: freebsd-fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E2DC111F84F2 for ; Mon, 9 Aug 2021 12:35:39 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GjwXp5ghCz4S6v; Mon, 9 Aug 2021 12:35:38 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by mail-ej1-x62f.google.com with SMTP id z20so5879969ejf.5; Mon, 09 Aug 2021 05:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YxMng5z+eLa87qXUtJKOy4GpWNrqKkJ+35RN/ZB4ZPM=; b=COZvcyYg2Khv6GGcKHUrCK7PH6eF59KFyjjei96h25c6oawGc4M7oqvG5Hpw2Zpb6P ALrlc2NC4OTvI+IabE5i/ehgzyXQc6HA4NXPyGDeOb9G3JUHUC3VEl4oRS1uW8me+oQV e15yd62mQer4aGHbqgzYYkQUauMjXlLfIDvcsRJrDYE0OlifQXZe0mEuUJGGoxqzDWsb jQ+ce+Wwn7ovIi2lVWTj61HUF2JcUKH8V1ZSkvgrkomhlW/EMUMk9zsY+QD8DDAJ90CJ mOuh1Ila04clsCfZp5xDRpmKJRPlUUQ9UzkbCU4WXsgOdskNySYBXQTtX4mUdeFYSzRo pITQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YxMng5z+eLa87qXUtJKOy4GpWNrqKkJ+35RN/ZB4ZPM=; b=IxZPqnVhfMcLeRgf1KPV6m8T2LgbYRIr0KvtePxvyS5W4T8MCcfQ+y7+hUPXAp4SCN jeJrs/SP0NLWo6Mzh0YJbIoUI6UNfueNEMVFxdv/ExbkrH87gE5ONeoKVmXT/vTeoQkX ipJAAnB6LJaDVpcwGKxSwjOLEKGfE10GKn9+lD4uI08MJXqHw1GQVP4SDYg9zWt9K8L9 f11tAEQzyGItddXPj/wR99ypW5fnv+GhSI+HTlEjQKdq5ieWcPzPIDSwtISDFj2Vfbzm 4gWbGGG92ZdOQ66tnGn3bziksKc9ywdz3ljmuXi47W2Nf6ugWMkHgQLYxt8JJgIVAGsu ndiQ== X-Gm-Message-State: AOAM533uzErUApS3g4YT4RwVAm1XAg8Zi7vskcaQWzgEPRGZx9MKPGaq QSD9LZcWZmCX9Z0bpZHBvo5TKNLkP3H5h6kWImVY0cu0Rfxl X-Google-Smtp-Source: ABdhPJzuW4RoEVEZdYiPvp7xsm8gGguiFLIRorIc1cvrJ30MxFwQa91M5R16/BD5uhK23wb+U/dY+7uSHJPZWhfyyAw= X-Received: by 2002:a17:906:af86:: with SMTP id mj6mr22536545ejb.144.1628512537708; Mon, 09 Aug 2021 05:35:37 -0700 (PDT) List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Zaphod Beeblebrox Date: Mon, 9 Aug 2021 08:35:25 -0400 Message-ID: Subject: Re: ZFS question To: Alan Somers Cc: joe mcguckin , freebsd-fs Content-Type: multipart/alternative; boundary="000000000000528c7205c91f9f21" X-Rspamd-Queue-Id: 4GjwXp5ghCz4S6v X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=COZvcyYg; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of zbeeble@gmail.com designates 2a00:1450:4864:20::62f as permitted sender) smtp.mailfrom=zbeeble@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62f:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: Y --000000000000528c7205c91f9f21 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It's a little more than that. FreeBSD has a method by which each GEOM thing is tested (called "tasting" in the documentation) and a consumer is chosen. tasting automatically reads the first few (and, I believe, last few) bytes of each GEOM when it comes online. GPT partition GEOM will attach if it has a GPT label... and will create providers for each partition. Each partition is then "tasted" and consumers get a chance to claim them. Consumers can be other label-like constructs or filesystems... but filesystems don't just auto mount. For UFS (and most filesystems) they need to be in /etc/fstab. For ZFS, it used to be /etc/zfs/zpool.cache (but I hear noises that some other method is used). In deference to the below, I believe that ZFS recognises it's disks with a taste (as ZFS VDEVS) and then can determine where they belong by reading the ZFS header. I don't believe the GUID is part of this --- it seems to remember the device that was last used as defaults. Now... the reason devices seem to use GUID mounts is that GUID is the highest priority taster (or somesuch). If devices move around, ZFS finds the drive by GUID first. If you turn off GUID (with kern.geom.label.gptid.enable=3D0 and/or kern.geom.label.disk_ident.enable= =3D0 in /boot/loader.conf) you'll get them mounted as daXsY or adaXsY. I usually put this in lader.conf as the "names" are shorter and display better in the table, to my eyes. You can do this with UFS, in a way, by either using the GUID mount (which doesn't change as the disk moves) or by creating either a UFS or a GPT label for the filesystem. It will then appear in /dev/ufs/