From nobody Thu Apr 13 09:17:08 2023 X-Original-To: questions@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 4Pxv9P4gF8z44bXl for ; Thu, 13 Apr 2023 09:17:13 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pxv9P09f5z3mwG for ; Thu, 13 Apr 2023 09:17:12 +0000 (UTC) (envelope-from freebsd@edvax.de) Authentication-Results: mx1.freebsd.org; none Received: from r56.edvax.de ([178.5.230.94]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPA (Nemesis) id 1MWRZr-1psdjC3fzf-00XtPY; Thu, 13 Apr 2023 11:17:10 +0200 Date: Thu, 13 Apr 2023 11:17:08 +0200 From: Polytropon To: "Dan Mahoney (Ports)" Cc: questions@FreeBSD.org Subject: Re: filesystem labels? Message-Id: <20230413111708.62d8c8d3.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:yIgqF9QgJ8xWD4/xPXZ2P1gUlCwDEYYBKbZpbpfhMzDRQEbosid Rx7WtL+BYpNB5h0LYUdh2hujmXPJ1VQe1j9A1cHop/Oi7ERL0EyuiyqSEbxwH2CaC71SSyA TBDWdlovViptTa/Zgjbc0jcOlzP5cyiV0WG92j2MVEHf/LSVdOkqtiYi95hCOHFpQJ8eG2s 8BEWkpNdAAi7P5q+PEL/g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:FJBrjt9ltV4=;zZKm7bdT+BeDzVnHJdBik7SE4ZD cVwsxjuNotOJ8lMPTqCdMAaapAUCiujkFf0OTgI3+idBKyddiZLYrOJ3KidGTzIfiCnO99j58 9bc0OcvzrRBaJw+7v5d5vpqcjTDZ3MIUdZuZFSrv/4wPgvSPDqmY335rknVnTv7qM1TzrTpn+ J2bFBuOLTFGOINCjzxd31ztuH88nnQc5dpoRDYsK4gufAzYO5tXUEGtUgRRahbdEe3aZ7fLwA oeKw8YEGlXOgdFQtUleee+otfov7DtLxeTqMrXd8YnzZwEQ77iSItCHC3tqOMgBJEjoz/mdlz BaR/w0MI9kI5bzVQbJcXh5lZjwvz622fDGk/CBcdMfcrcsNNx5lOCs6STc8znp7miGvTKD+SA rLKf0WzCJzcAZPk8RsxfzaoJnLG96aXV6lY0lcetxni2NODL7qjliCx/voIeQP4rSRmEfl7ys cQJcbbnq5SRkyf0fMR4Na6gZj78+MUkBIEyZc5cigAi6ejSEvw8oYtX1dVVAW0vATLGd6oeAw hfdZCHb7l8C8H5X7QwfwigpSIIyAbeEaOmS7TULr5Nrfmne8FHes7EhXN+bDGkApo5MPN7Kk6 H1vqmEzQ8f/5/auwEyNYyVEJ7P3fT9q4Kh94CR1fUYwGtZtutjG1injAY5onsNqlyPu3Kk8tv yKBWtOHUcJKg8ttaCkxr/Pj0xgdEkQ9cHj+xjcSWjw== X-Rspamd-Queue-Id: 4Pxv9P09f5z3mwG X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Wed, 12 Apr 2023 08:58:22 -0700, Dan Mahoney (Ports) wrote: > I find that the handbook mentions glabel labels, but several > other places say don’t use them. For example? THis is a honest question, because in my experience glabels are a common solution for disk labelling. > I managed to apply a gpt label to my new partition that I > created using only “gpart” > > The handbook mentions glabel labels, and tunefs labels, but > says nothing about GPT labels. GPT labels are specific to GPT partitioning scheme (as opposed to MBR partitioning, either as "dedicated mode" with bare partitions, or "DOS mode" with partitions inide slices). Because today you're probably going to use GPT partitioning, GPT labels can be used without any problem. Labels applied to MBR-style partitions can be both glabel or UFSIDs. > I’ve seen some more complete posts on the forums > (i.e. https://forums.freebsd.org/threads/how-to-label-partitions.64380/) > but they still don’t show the full picture of what > labels are usable where, by what and which. Allow me to try to help with this problem: GPT partitioning: devices: /dev/da0p1, /dev/da0p2, ... tool: gpart label: GPT label location: /dev/gpt/ MBR partitioning: tools: gpart (traditional: fdisk, disklabel) dedicated partitioning: devices: /dev/da0a, /dev/da0b, ... tool: glabel label: glabel location: /dev/label/ applied to FS (instead of partition): tools: newfs, tunefs label: UFS label location: /dev/ufs/ -or- tool: none label: UFSID location: /dev/ufsid/ DOS style ("primary DOS partitions"): devices: /dev/da0s1a, da0s1b, ... /dev/da1s1a, ... tools and labels as above My very own summary is: When you setup disks, use GPT. Use MBR only if you have a good reason to. :-) Of course you _can_ apply a UFS label or use a UFSID for a UFS filesystem in a GPT partition, but that's not really neccessary because you can already label the partition itself. > Is there a good primer people know of of what the various > types are, fully, which are supported in fstab, which work > with ZFS only, and the like? Not that I'm aware of, but please compare: https://docs.freebsd.org/en/books/handbook/geom/#geom-glabel https://people.freebsd.org/~rodrigc/doc/data/doc/en_US.ISO8859-1/books/handbook/bsdinstall-partitioning.html http://wonkity.com/~wblock/docs/html/disksetup.html > Or should I just keep on using /dev/daX in fstab? Nothing wrong with that in a static environment, i. e., one where you can safely predict which devices wiill be detected in which order to conclude what their device filenames will be. Otherwise, go with GPT labels. > (This only came up, as I’m moving virtual disk images > around, and renumbering happens automatically when I > delete one from a running vm), so labels are useful > in this case. Definitely. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...