From owner-freebsd-fs@freebsd.org Tue Sep 22 14:50:52 2015 Return-Path: Delivered-To: freebsd-fs@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 CFECFA07AD6 for ; Tue, 22 Sep 2015 14:50:52 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-vk0-x22c.google.com (mail-vk0-x22c.google.com [IPv6:2607:f8b0:400c:c05::22c]) (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 88354194A for ; Tue, 22 Sep 2015 14:50:52 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: by vkgd64 with SMTP id d64so7962071vkg.0 for ; Tue, 22 Sep 2015 07:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DJIJF8D/RYTzyRSJn9QxdI4W8Fe+vDTAlpvD8YzgWPI=; b=ZuIPDGTSQmPyuKjBQKU9oYTT2UdokfvWR5TTrflVStc1yCNHIQGWDh5olEcOS0RTqG NgvfuIXk683uRW26/d6T274GrhBnXROPKaGP7vFYfUmZjXlanrCLzXXYIKXpUoNmGArm 2RXit27nwc6CKpTUY3OhBg0frFOfyV2nHUGynCWPQRbSwG7IjoVVyjIYcvtQLBCnfCyZ qjn9+P8TfR4mnEmrAqSBXi/PZvztTMkCRJUkArbgyY2DjcLybvo3FTnzcZlRGOUqJ2Rr MJy9EbknknRFkt3vuLVpz7Ztv65eyIf9hZ+I4gguZhiQBmnnp80qXcM4s402dXklIPnw LGLg== MIME-Version: 1.0 X-Received: by 10.31.9.202 with SMTP id 193mr12357887vkj.155.1442933451566; Tue, 22 Sep 2015 07:50:51 -0700 (PDT) Received: by 10.31.200.7 with HTTP; Tue, 22 Sep 2015 07:50:51 -0700 (PDT) In-Reply-To: <5cd22ba8f67a46a0a1f77b4646f3eaa5@SERVER.ad.usd-group.com> References: <56004C68.4020904@stankevitz.com> <5600F0DF.8000805@stankevitz.com> <5cd22ba8f67a46a0a1f77b4646f3eaa5@SERVER.ad.usd-group.com> Date: Tue, 22 Sep 2015 07:50:51 -0700 Message-ID: Subject: Re: Name/label/id metadata: how do I make it go away From: Freddie Cash To: Matt Churchyard Cc: FreeBSD FS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 14:50:53 -0000 On Tue, Sep 22, 2015 at 2:44 AM, Matt Churchyard via freebsd-fs < freebsd-fs@freebsd.org> wrote: > >Warren/Freddie, > > >Thank you for your replies. > > >On 9/21/15 8:41 PM, Warren Block wrote: > >>> - gpt id > >> > >> A system-assigned ID in the GPT metadata. Requires GPT partitioning. > > >>> I have a zfs pool of "entire disks". "zpool status" shows some > >>> disks with their daX name (which I prefer) and some with a hideously > >>> ugly name such as DISK-%20%20%20%20%20-WD-WMC4NOH1ASDF > >> > >> Disable those labels with kern.geom.label.gptid.enable=3D"0" in > >> /boot/loader.conf. > > >Combining your two statements quoted above, I believe I can conclude tha= t > my ZFS "whole disk" drives must have some remnants of GPT left >over from > their previous lives (namely the system-assigned ID in the GPT metadata). > > >Surprisingly, these apparently GPT-supplied labels appear to "go away" > >when I issue a "glabel stop". I would not expect this given that Warren > explained that glabels (whose metadata are stored at the end of the >devi= ce > and completely outside the virtual device) are not the same as GPT labels > (whose metadata are stored within the device on the GPT >metadata). > > >I believe one of the following must be true: > > >1. It is possible to use "glabel stop" to disable a "GPT system-assigned > ID" -- even though glabel is a tool for manipulating another style of > labels. > > >2. "glabel stop" only affects glabels. In my case my drives must contai= n > "glables" and not "GPT system-assigned IDs" as Warren guessed. > > >3. I misunderstood and glabels/GPS system-assigned IDs are really the > same thing. > > >Thank you again, > > >Chris > > >The diskid entries have nothing to do with GPT. I suspect your disks do > not have any partitioning. These labels are generated automatically >base= d > on the actual vendor supplied ID for each disk. > > >The glabel command allows you to assign a label to a GEOM device, which > will then appear as /dev/label/name. I personally dislike these as >they > are not portable and are one block smaller than the original device, whic= h > is still accessible. > > >It appears glabel is also responsible for identifying various other > "labelling" methods that weren't necessary created using the utility. For > >instance it will create /dev/ufsid/X devices, where X is the ID of a UFS > filesystem it has found on a GEOM device. It also seems to be >responsibl= e > for creating /dev/gpt entries as well as /dev/diskid, which is possibly w= hy > they disappear when you run glabel stop. Most of this is >mentioned in th= e > man page, although it doesn't mention the diskid entries; There does > however appear to be a >geom/label/g_label_disk_ident.c source file >whic= h > implements the /dev/diskid/X functionality. > > >The thing to be clear on is that although glabel is responsible for > creating the device nodes for most of these labels, the way they are > assigned is >very different > > >diskid - Automatic based on the ID of the disk - so should reference an > entire disk gpt - Assigned manually to a partition by GPT partitioning a > >disk and creating labelled partitions gptid - Automatic when you partiti= on > a disk with GPT and create partitions (every GPT partition has a unique > >GUID) glabel - Assigned to any disk or partition manually by using the > glabel command > > >Interestingly, looking though sysctl, I see options to turn off most > label devices, but nothing mentions diskid. I don't know if this is > actually >missing, or if one of the existing sysctls also turns them off= . > (Surely there should ideally be a kern.geom.label.diskid.enable?) > > >kern.geom.label.ext2fs.enable: 1 > >kern.geom.label.iso9660.enable: 1 > >kern.geom.label.msdosfs.enable: 1 > >kern.geom.label.ntfs.enable: 1 > >kern.geom.label.reiserfs.enable: 1 > >kern.geom.label.ufs.enable: 1 > >kern.geom.label.ufsid.enable: 1 > >kern.geom.label.gptid.enable: 1 > >kern.geom.label.gpt.enable: 1 > > Ignore that last bit. Just found the sysctl to turn off the diskid entrie= s > - > > kern.geom.label.disk_ident.enable: 1 > =E2=80=8BThat must be new in 10.x. In 9.x (and presumably 8.x), the gptid sysctl disables the diskid labels. Guessing in 10.x they split the two into separate sysctls? --=20 Freddie Cash fjwcash@gmail.com