Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Dec 2019 00:33:51 +0100 (CET)
From:      =?UTF-8?Q?Trond_Endrest=C3=B8l?= <trond.endrestol@ximalas.info>
To:        Kralj Karlo <karlo@klarinet.osamsb.hr>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Moving root on ZFS on GELI so GELI is no longer used
Message-ID:  <alpine.BSF.2.21.99999.352.1912300004551.14099@enterprise.ximalas.info>
In-Reply-To: <20191229173722.EB89680060@mailuser.nyi.internal>
References:  <20191204223149.A880630600A8@mailuser.nyi.internal> <alpine.BSF.2.21.99999.352.1912050759190.5621@enterprise.ximalas.info> <20191229173722.EB89680060@mailuser.nyi.internal>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sun, 29 Dec 2019 17:37-0000, Kralj Karlo wrote:

> Trond Endrestøl writes:
> > man zfs, searching for zfs snapshot, zfs send, and zfs receive.
> >
> > My take usually is:
> >
> > 1. Make sure boot partitions are present and populated on the new disk(s).
> >    The same for any swap partitions.
> 
> Could you elaborate on this step or refer to relevant man pages?
> This is the step I don't know how to do.

Assuming da0 and da1 are your new disks, and you want these disks to 
be bootable on both legacy (BIOS) and UEFI systems, then I would do 
something like this:

# Create GPT on da0 and da1
gpart create -s gpt da0
gpart create -s gpt da1

# Create legacy boot partition and ESP for UEFI on da0
gpart add -a 4K -s 512K -t freebsd-boot -l gptboot0 da0
gpart add -a 4K -s 800K -t esp          -l esp0     da0

# Ditto for da1
gpart add -a 4K -s 512K -t freebsd-boot -l gptboot1 da1
gpart add -a 4K -s 800K -t esp          -l esp1     da1

# Write bootcode to da0
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot   -i 1 da0
gpart bootcode               -p /boot/boot1.efifat -i 2 da0

# Ditto for da1
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot   -i 1 da1
gpart bootcode               -p /boot/boot1.efifat -i 2 da1

Further, I probably would add a couple of swap partitions for swap, 
and another couple of swap partitions for dumps (though only one of 
them will actually be used), and a couple of ZFS partition for a 
mirrored root pool:

gpart add -a 4K -s 16G -t freebsd-swap -l swap0  da0
gpart add -a 4K -s 16G -t freebsd-swap -l swap1  da1

gpart add -a 4K -s 16G -t freebsd-swap -l dump0  da0
gpart add -a 4K -s 16G -t freebsd-swap -l dump1  da1

gpart add -a 4K        -t freebsd-zfs  -l zroot0 da0
gpart add -a 4K        -t freebsd-zfs  -l zroot1 da1

Consult gpart(8) for more information on the syntax.

For SSDs, you might want an alignment of 1M. And if you don't have or 
plan on using 4Kn drives, you can omit specifying alignment 
altogether.

You could move the swap and dump partitions to a dedicated disk. I use 
such a setup for my VMs where conservation of physical disk space is 
something to consider.

Next, create your ZFS pools as you normally would.

In the case of 4Kn drives, you might want to do sysctl 
vfs.zfs.min_auto_ashift=12 before creating any new pools. Run the 
sysctl command after you have run kldload zfs, unless your kernel has 
internal/static support for ZFS.

I prefer to take advantage of the GPT labels. That way I can shuffle 
my disks around without any ill results. The gpart add commands above 
will lead to:

/dev/gpt/gptboot0
/dev/gpt/esp0
/dev/gpt/swap0
/dev/gpt/dump0
/dev/gpt/zroot0

/dev/gpt/gptboot1
/dev/gpt/esp1
/dev/gpt/swap1
/dev/gpt/dump1
/dev/gpt/zroot1

You can expand on the GPT labels, e.g. letting them include the 
hostname, if desired.

GPT labels are limited to 36 characters stored as UTF-16LE.

-- 
Trond.
From owner-freebsd-questions@freebsd.org  Mon Dec 30 04:57:43 2019
Return-Path: <owner-freebsd-questions@freebsd.org>
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 770D11D532B
 for <freebsd-questions@mailman.nyi.freebsd.org>;
 Mon, 30 Dec 2019 04:57:43 +0000 (UTC) (envelope-from vas@sibptus.ru)
Received: from admin.sibptus.ru (admin.sibptus.ru
 [IPv6:2001:19f0:5001:21dc::10])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 47mQCp2bJcz4Yqy
 for <freebsd-questions@freebsd.org>; Mon, 30 Dec 2019 04:57:42 +0000 (UTC)
 (envelope-from vas@sibptus.ru)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; 
 s=20181118; h=Message-ID:Subject:To:From:Date:In-Reply-To;
 bh=K1C0CqgFKfPC3M+PQc5heooleWeZrAmYgg0hpB8kYLA=; b=hSE5QFcQ+4NqyfxU/G1AIVS3Gf
 3n7Mkv3cdeNB+jQEuI2wdpWRMpEBmIR1+xFEyp3S/zFzL7OTgAOx1JZIX4dYk65pw60xKDo61rmoo
 kWok9XtZ9BhiiaihOfry9mFnGlbsDfm4+obASaOhCq8IaDYKv3V+LEgu659sKBMzWs/k=;
Received: from vas by admin.sibptus.ru with local (Exim 4.92.3 (FreeBSD))
 (envelope-from <vas@sibptus.ru>) id 1iln7c-0005Uv-2U
 for freebsd-questions@freebsd.org; Mon, 30 Dec 2019 11:57:40 +0700
Date: Mon, 30 Dec 2019 11:57:40 +0700
From: Victor Sudakov <vas@sibptus.ru>
To: freebsd-questions@freebsd.org
Subject: kernel: drmn0: This code is obsolete abandonware. Install the
 graphics/drm-legacy-kmod pkg
Message-ID: <20191230045740.GA20668@admin.sibptus.ru>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3"
Content-Disposition: inline
X-PGP-Key: http://admin.sibptus.ru/~vas/
X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9  3532 0DA4 F259 9B5E C634
X-Rspamd-Queue-Id: 47mQCp2bJcz4Yqy
X-Spamd-Bar: --------
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=sibptus.ru header.s=20181118 header.b=hSE5QFcQ;
 dmarc=pass (policy=none) header.from=sibptus.ru;
 spf=pass (mx1.freebsd.org: domain of vas@sibptus.ru designates
 2001:19f0:5001:21dc::10 as permitted sender) smtp.mailfrom=vas@sibptus.ru
X-Spamd-Result: default: False [-8.35 / 15.00]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_DKIM_ALLOW(-0.20)[sibptus.ru:s=20181118];
 FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx];
 TO_MATCH_ENVRCPT_ALL(0.00)[];
 MIME_GOOD(-0.20)[multipart/signed,text/plain];
 TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0];
 RCPT_COUNT_ONE(0.00)[1];
 IP_SCORE(-3.25)[ip: (-9.88), ipnet: 2001:19f0:5000::/38(-4.94), asn:
 20473(-1.38), country: US(-0.05)]; 
 DKIM_TRACE(0.00)[sibptus.ru:+];
 DMARC_POLICY_ALLOW(-0.50)[sibptus.ru,none];
 SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[];
 MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[];
 ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US];
 RCVD_COUNT_TWO(0.00)[2]
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2019 04:57:43 -0000


--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Dear Colleagues,

On an "HP ProBook 6560b" notebook running FreeBSD 12.1, I've installed
graphics/drm-kmod and loaded it via
kld_list=3D"/boot/modules/radeonkms.ko" in rc.conf. The X server even works=
 OK.

# pkg which "/boot/modules/radeonkms.ko"
/boot/modules/radeonkms.ko was installed by package drm-fbsd12.0-kmod-4.16.=
g20191120

However, the kernel complains:

"kernel: drmn0: This code is obsolete abandonware. Install the graphics/drm=
-legacy-kmod pkg"

Is this some kind of bug? Why would graphics/drm-kmod be considered obsolet=
e?

--=20
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

--BOKacYhQ+x31HxR3
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJeCYPEAAoJEA2k8lmbXsY03cAH/3aJQt+/coIlC1sy5euswpMN
qOxUNzI0MrP0L7aaDDCRlFPIrH/sg+ACoCpQBM/GDWCOq1yBbBOfH/qcfobUodaO
rzIjZoGBTZpuf+UkIlV0D14MyUcwEYSdkVkoxdKnaH5XrbQjfumNB++UJQHKln8i
VHzJa/eE8vGMlbWkvTQL6OqDk3+q7lKt4if84/2NeOMcdC6iwO+zd0tNnh3n3Uxw
i7Ytv7McnWA26GRLR4L+ylQ6Ee8CD3ulTvTjD66SGj4sCu2UCMIOdCOXIVqNvqvo
SGYzk3ciMcrL9+SjrpSPhejyWLtpW8Muyy8WYj6zg4G2qh+RLBUUoBVwclWoSJg=
=Cqqy
-----END PGP SIGNATURE-----

--BOKacYhQ+x31HxR3--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.21.99999.352.1912300004551.14099>