From owner-freebsd-questions@freebsd.org Fri May 1 03:29:59 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4562D2D1024 for ; Fri, 1 May 2020 03:29:59 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49CyRp2f7dz4Qwc for ; Fri, 1 May 2020 03:29:58 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.223.160.45]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPA (Nemesis) id 1M3DBd-1jSzKB43jx-003i83; Fri, 01 May 2020 05:29:47 +0200 Date: Fri, 1 May 2020 05:29:46 +0200 From: Polytropon To: Trond =?ISO-8859-1?Q?Endrest=F8l?= Cc: Christoph Kukulies , freebsd-questions@freebsd.org Subject: Re: Mounting from ufs:/dev/ad2s1a failed with error 19. Message-Id: <20200501052946.961f8147.freebsd@edvax.de> In-Reply-To: References: <4348B2AE-3E30-4345-8883-EAEA53A59220@kukulies.org> <0D1F4392-C646-42C8-9DB3-50F93236A6DC@kukulies.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:/CmZfZjLe8JMj9/exP5IEvRsvldk8U/WzkNZTW7QX9QgwJtW8c6 qy1cS8xoexajtUUPhZ0Rfvxw+VIGCPahMgYkhH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u3D X-Rspamd-Queue-Id: 49CyRp2f7dz4Qwc X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.130) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [4.63 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[45.160.223.94.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.76)[0.764,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[130.126.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[130.126.227.212.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.47)[ip: (1.53), ipnet: 212.227.0.0/16(-1.22), asn: 8560(2.06), country: DE(-0.02)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2020 03:29:59 -0000 On Thu, 30 Apr 2020 22:06:04 +0200 (CEST), Trond Endrest=F8l wrote: > On Thu, 30 Apr 2020 21:47+0200, Christoph Kukulies wrote: >=20 > > Fine, but where in the installation process would I have had a chance t= o decide for that option? > > Can I define UUID labels (is that GPT?) in the hindsight? >=20 > Your system uses MBR, hence the ad0s prefix. >=20 > UFS labels can be set while in singleuser mode, this is particular=20 > important for the root filesystem. Technically, they are to be set while the partition in question is _not mounted_ (i. e., this would also work in multi-user mode if you can unmount the partitions you're going to label in that particular mode). The restriction of / is that it usually will work when / is mounted read-only. To be fully safe, you could always boot from a USB stick or a FreeBSD installation CD or DVD, and use that environment for the labeling operation. Of course the single-user mode still is a convenient solution for this specific requirement. > 1. Reboot to singleuser mode. > 2. Hit the enter key when asked about which shell to launch. > 3. tunefs -L root /dev/ad0s1a > 4. Ditto for the other *UFS* partitions. Consult your /etc/fstab. > 5. Verify the labels using dumpfs /dev/ad0s1a > 6. Reboot to multiuser mode. > 7. Duplicate the necessary lines in /etc/fstab. > 8. Comment out the original lines, in case you must revert. > 9. Change the duplicate lines to refer to /dev/ufs/root, etc. > 10. Reboot to see if you have succeeded. > 11. Remove the original lines in /etc/fstab, if desired. Correct - this will be the UFS labels, one out of three methods of labeling (glabel and ufsid being the other two). Note that those relate to UFS filesystems, not to the partitioning scheme they have been created in; it also works for "dedicated" (i. e., when you don't have any partitioning at all). Documentation and further inspiration can be found here: https://www.freebsd.org/doc/handbook/geom-glabel.html http://www.wonkity.com/~wblock/docs/html/disksetup.html However, on modern system you should probably use GPT and add GPT labels. Use MBR (or dedicated) only if you have a good reason to do so. :-) Note that the different labeling mechanisms result in specific naming conventions in /etc/fstab (/dev/ufs/..., /dev/label/..., /dev/gpt/..., ufsid/... and so on). > I recall issues in the past using glabel(8) which stores the label in=20 > the last disk block (sector) of the partition. Hence the labeled=20 > device file should present a device which is one disk block shorter to=20 > avoid the label being overwritten. Maybe someone else can chime in on=20 > this. Yes, this is something you will have to pay attention to, especially when you want to re-use a disk for something else. If I remember correctly, dealing with them also requires the setting of a debug flag (sysctl) for proper label destruction. --=20 Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...