From owner-freebsd-fs@freebsd.org Tue Sep 22 08:17:37 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 D6CE9A031CA for ; Tue, 22 Sep 2015 08:17:37 +0000 (UTC) (envelope-from matt.churchyard@userve.net) Received: from smtp-outbound.userve.net (smtp-outbound.userve.net [217.196.1.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.userve.net", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D5101DE4 for ; Tue, 22 Sep 2015 08:17:36 +0000 (UTC) (envelope-from matt.churchyard@userve.net) Received: from owa.usd-group.com (owa.usd-group.com [217.196.1.2]) by smtp-outbound.userve.net (8.15.1/8.15.1) with ESMTPS id t8M8FBs3037705 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 22 Sep 2015 09:15:12 +0100 (BST) (envelope-from matt.churchyard@userve.net) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=userve.net; s=201508; t=1442909714; bh=vBy05hri4E3H0WGcqBHW0wP2UvtJySdX/XRS8IQ9nNo=; h=From:To:CC:Subject:Date:References:In-Reply-To; b=PTB353bcv+88aLKPyCw8oHw51bauONJZU/TLFHkpHS3Ezk1kWwRMOuiz6zGVmGY8g vt2jjq0JhltUfOcnBsPVP4JWa/6poDhXem2Vlvz4vSlSmY/R6K1rpSNJR27QyuImZp 27+9hPoZ3bZ+ltLs8hez+P2TKYMJolEJKaoPQ11Y= Received: from SERVER.ad.usd-group.com (192.168.0.1) by SERVER.ad.usd-group.com (192.168.0.1) with Microsoft SMTP Server (TLS) id 15.0.847.32; Tue, 22 Sep 2015 09:15:06 +0100 Received: from SERVER.ad.usd-group.com ([fe80::b19d:892a:6fc7:1c9]) by SERVER.ad.usd-group.com ([fe80::b19d:892a:6fc7:1c9%12]) with mapi id 15.00.0847.030; Tue, 22 Sep 2015 09:15:06 +0100 From: Matt Churchyard To: Chris Stankevitz CC: FreeBSD FS Subject: RE: Name/label/id metadata: how do I make it go away Thread-Topic: Name/label/id metadata: how do I make it go away Thread-Index: AQHQ9JzHyu4NGbe190ufZB2ZpGj8Vp5H1yIAgAApr4CAAC1l4A== Date: Tue, 22 Sep 2015 08:15:05 +0000 Message-ID: References: <56004C68.4020904@stankevitz.com> <5600F0DF.8000805@stankevitz.com> In-Reply-To: <5600F0DF.8000805@stankevitz.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.0.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 08:17:37 -0000 >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=20 >>> with their daX name (which I prefer) and some with a hideously ugly=20 >>> name such as DISK-%20%20%20%20%20-WD-WMC4NOH1ASDF >> >> Disable those labels with kern.geom.label.gptid.enable=3D"0" in=20 >> /boot/loader.conf. >Combining your two statements quoted above, I believe I can conclude that = my ZFS "whole disk" drives must have some remnants of GPT left >over from t= heir previous lives (namely the system-assigned ID in the GPT metadata). >Surprisingly, these apparently GPT-supplied labels appear to "go away"=20 >when I issue a "glabel stop". I would not expect this given that Warren e= xplained that glabels (whose metadata are stored at the end of the >device = 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 I= D" -- even though glabel is a tool for manipulating another style of labels= . >2. "glabel stop" only affects glabels. In my case my drives must contain = "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 based on t= he actual vendor supplied ID for each disk. The glabel command allows you to assign a label to a GEOM device, which wil= l then appear as /dev/label/name. I personally dislike these as they are no= t portable and are one block smaller than the original device, which is sti= ll accessible. It appears glabel is also responsible for identifying various other "labell= ing" 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 responsible for creatin= g /dev/gpt entries as well as /dev/diskid, which is possibly why they disap= pear when you run glabel stop. Most of this is mentioned in the man page, a= lthough it doesn't mention the diskid entries; There does however appear to= be a geom/label/g_label_disk_ident.c source file which implements the /dev= /diskid/X functionality. The thing to be clear on is that although glabel is responsible for creatin= g the device nodes for most of these labels, the way they are assigned is v= ery different=20 diskid - Automatic based on the ID of the disk - so should reference an ent= ire disk gpt - Assigned manually to a partition by GPT partitioning a disk and creat= ing labelled partitions gptid - Automatic when you partition 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 com= mand 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 mis= sing, 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 Regards, Matt Churchyard