Date: Fri, 1 May 2020 08:55:10 +0200 From: Polytropon <freebsd@edvax.de> To: David Christensen <dpchrist@holgerdanske.com> Cc: freebsd-questions@freebsd.org Subject: Re: Mounting from ufs:/dev/ad2s1a failed with error 19. Message-ID: <20200501085510.9ef376bb.freebsd@edvax.de> In-Reply-To: <10b538ce-7b4d-22c1-dbde-60672244422e@holgerdanske.com> References: <4348B2AE-3E30-4345-8883-EAEA53A59220@kukulies.org> <0D1F4392-C646-42C8-9DB3-50F93236A6DC@kukulies.org> <20200501051126.a41ff1cd.freebsd@edvax.de> <10b538ce-7b4d-22c1-dbde-60672244422e@holgerdanske.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 30 Apr 2020 22:42:47 -0700, David Christensen wrote: > On 2020-04-30 20:11, Polytropon wrote: > > On Thu, 30 Apr 2020 20:29:14 +0200, Christoph Kukulies wrote: > >> Could solve it myself: bootet back to usb drive, mounted > >> /dev/ada0s1 /mnt and edited /mnt/etc/fstab to the correct > >> mount device. > >> There were ada2s1 for / and another ada2 device for swap. > >> Changed that to ada0s1 and now the system boots fine. > > > > If you can, use labels to avoid those kinds of problem. :-) > > > > https://www.freebsd.org/doc/handbook/geom-glabel.html > > Is there a FreeBSD labeling solution, or any other identifier solution > that avoids using device nodes, for the combination BIOS, MBR, GELI, and > ZFS? For this constellation, probably glabel is the convenient tool: "glabel label <name> <device>", and then in the "zpool create" command use gpt/<name> indead of the device name. I have no idea of why MBR should be involved here (as you want to use ZFS)... Documentation: https://www.freebsd.org/doc/handbook/zfs-quickstart.html As the example shows, there is no MBR-related step involved. ZFS can manage devices just fine by itself. However, today's suggestion is to always use gpart (with -t freebsd-zfs for use with ZFS), so that's probably the best way to go. Here is some specific inspiration that also includes the use of GELI: https://blog.haraschak.com/from-dev-to-label/ So if I understand this correctly, the suggested approach is to use -l <label> in the "gpart add -t freebbsd-zfs" step for each disk, and then using those labels as mentioned above. The GELI partitions should then bear that name <label>.eli instead of the device name <device>.eli. > And, that works if I use dd(1) to copy the raw system disk > contents from one device to another -- ATA drive, USB drive, SD card, etc.? That probably depends on the source and target size, as if I remember correctly, labels are stored at the "logical end" of the device (last sector or block). However, labels are not supposed to be "cloned" that way. A typical solution is to prepare the target media using the appropriate tools (like gpart, maybe newfs), and then transfering the data. For ZFS, always use ZFS's native tools for that; for UFS, dump and restore are very convenient (and can deal with the case of non-matching sizes). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200501085510.9ef376bb.freebsd>