From nobody Fri Apr 14 04:42:27 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 4PyP2c4N9tz45NXs for ; Fri, 14 Apr 2023 04:43:04 +0000 (UTC) (envelope-from freebsd@gushi.org) Received: from prime.gushi.org (prime.gushi.org [IPv6:2620:137:6000:10::142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "prime.gushi.org", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PyP2b3N87z3Pt0 for ; Fri, 14 Apr 2023 04:43:02 +0000 (UTC) (envelope-from freebsd@gushi.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple ([IPv6:2601:602:87f:b05d:18b1:e035:bc23:1320]) (authenticated bits=0) by prime.gushi.org (8.16.1/8.16.1) with ESMTPSA id 33E4ggbH088637 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 21:42:44 -0700 (PDT) (envelope-from freebsd@gushi.org) DKIM-Filter: OpenDKIM Filter v2.10.3 prime.gushi.org 33E4ggbH088637 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gushi.org; s=prime2014; t=1681447365; bh=b+YE+6W9kTyzvF9zgtwwYQfBU0jUXjEkDHX9xmhrDFM=; h=From:Subject:Date:In-Reply-To:Cc:To:References; z=From:=20"Dan=20Mahoney=20(Ports)"=20|Subject:= 20Re:=20filesystem=20labels?|Date:=20Thu,=2013=20Apr=202023=2021:4 2:27=20-0700|In-Reply-To:=20<20230413111708.62d8c8d3.freebsd@edvax .de>|Cc:=20"questions@freebsd.org"=20|To:=2 0Polytropon=20|References:=20=0D=0A=20<20230413111708.62d8c8d3.fre ebsd@edvax.de>; b=Ftj7DXgA/G9pQQXjnnuUMvZ1Y76ZiYh1wOhvwdTHVUpvsfq2rrFiyIDC6RbWHd/XP oXY1XxKxNB1bYQ+QdymLfQKCEBP33Yz4HdNIN1pyZWeeitnRYKLYLlY32V9Z+rC0sI qNp0sXv6q2ZxTVdMChk1iSnJcbHE0NDJ7+eFUvL5GkyOpu1bpRSYdFZH68CQoYwGPL rxYiD9IGTibVlXsRxg5CheLr/69zLTEJzTPgZU9ZqTcAl8Amn6r1km4aQbR2YTupDB 8ho2/ScOt2S76hcMToIlFp9g9tD85Lj+yfyMr7F0tPxiBKdO6hylTWqsiL0OrDnIY7 JjAXxKYjyYiGw== X-Authentication-Warning: prime.gushi.org: Host [IPv6:2601:602:87f:b05d:18b1:e035:bc23:1320] claimed to be smtpclient.apple From: "Dan Mahoney (Ports)" Message-Id: <82C015E0-71B9-4189-AA84-71219CA14E73@gushi.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_0B0FDC82-EF5D-4302-AD86-313021D1CBBE" 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 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: filesystem labels? Date: Thu, 13 Apr 2023 21:42:27 -0700 In-Reply-To: <20230413111708.62d8c8d3.freebsd@edvax.de> Cc: "questions@freebsd.org" To: Polytropon References: <20230413111708.62d8c8d3.freebsd@edvax.de> X-Mailer: Apple Mail (2.3731.500.231) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (prime.gushi.org [IPv6:2620:137:6000:10:0:0:0:142]); Fri, 14 Apr 2023 04:42:53 +0000 (UTC) X-Rspamd-Queue-Id: 4PyP2b3N87z3Pt0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:393507, ipnet:2620:137:6000::/44, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_0B0FDC82-EF5D-4302-AD86-313021D1CBBE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 13, 2023, at 2:17 AM, Polytropon wrote: >=20 > 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=E2=80=99t use them. >=20 > For example? >=20 > THis is a honest question, because in my experience glabels > are a common solution for disk labelling. Warren Block (see the wonkitty link below? Same person.) said in this = old post to avoid it if you can: = https://forums.freebsd.org/threads/odd-dax-device-mapping-in-freebsd-9-1-r= c1.34676/=EF=BF=BC It=E2=80=99s also specific not only to an OS type, but also a fliesystem = type, whereas if you=E2=80=99re using GPT disks. =3D=3D=3D >> I managed to apply a gpt label to my new partition that I >> created using only =E2=80=9Cgpart=E2=80=9D=20 >>=20 >> The handbook mentions glabel labels, and tunefs labels, but >> says nothing about GPT labels. >=20 > 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. Right now, the problem I=E2=80=99ve found is that even though I just = added a new device, and labeled it, it doesn=E2=80=99t show up in = /dev/gpt/anything =E2=80=94 and even /dev/gpt doesn=E2=80=99t exist, = despite having previous GPT disks in the system, at boot. The new drive = doesn=E2=80=99t show in /dev/gpt even after a reboot. There are mentions of a number of sysctls that one *can* set, but not a = great list of what they do. root@collect-us:/home/dmahoney # sysctl -a | grep geom.label kern.features.geom_label: 1 kern.geom.label.disk_ident.enable: 0 kern.geom.label.gptid.enable: 1 kern.geom.label.gpt.enable: 1 kern.geom.label.ufs.enable: 1 kern.geom.label.ufsid.enable: 1 kern.geom.label.reiserfs.enable: 1 kern.geom.label.ntfs.enable: 1 kern.geom.label.msdosfs.enable: 1 kern.geom.label.iso9660.enable: 1 kern.geom.label.flashmap.enable: 1 kern.geom.label.ext2fs.enable: 1 kern.geom.label.debug: 0 What manpage would document any of the above? >> I=E2=80=99ve seen some more complete posts on the forums >> (i.e. = https://forums.freebsd.org/threads/how-to-label-partitions.64380/) >> but they still don=E2=80=99t show the full picture of what >> labels are usable where, by what and which. >=20 > Allow me to try to help with this problem: >=20 > 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 >=20 > My very own summary is: When you setup disks, use GPT. > Use MBR only if you have a good reason to. :-) >=20 > 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. >=20 >=20 >=20 >> 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? >=20 > Not that I'm aware of, but please compare: >=20 > https://docs.freebsd.org/en/books/handbook/geom/#geom-glabel >=20 > = https://people.freebsd.org/~rodrigc/doc/data/doc/en_US.ISO8859-1/books/han= dbook/bsdinstall-partitioning.html >=20 > http://wonkity.com/~wblock/docs/html/disksetup.html >=20 >=20 >=20 >> Or should I just keep on using /dev/daX in fstab? >=20 > 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. In this particular setup, I had a virtual machine with three disks, one = of which was slated to be removed. VMWare presents things to the SCSI = bus, in the order they=E2=80=99re added ot the system: Virtual Disk 1: /dev/da0 Virtual Disk 2:/dev/da1 Virtual Disk 3:/dev/da2 What happens when I shut down, remove that second device, and reboot? = Disk 3 gets renumberd to disk 2, and gets seen as da1. That=E2=80=99s my use case. Using /dev/daX in here is always suceptible = to that problem. But=E2=80=A6when the device entries don=E2=80=99t show up, either = immediately, and on reboot, and the manpages don=E2=80=99t tell me how = to rescan the thing, then I turn to -questions :) -Dan --Apple-Mail=_0B0FDC82-EF5D-4302-AD86-313021D1CBBE Content-Type: multipart/related; type="text/html"; boundary="Apple-Mail=_D5EF5D0A-D179-4F12-B0B5-2BBD024B9F13" --Apple-Mail=_D5EF5D0A-D179-4F12-B0B5-2BBD024B9F13 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Apr = 13, 2023, at 2:17 AM, Polytropon <freebsd@edvax.de> = wrote:

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=E2=80=99t use = them.

For example?

THis is a honest question, = because in my experience glabels
are a common solution for disk = labelling.

Warren Block = (see the wonkitty link below?  Same person.) said in this old post = to avoid it if you can: