From owner-freebsd-questions@freebsd.org Fri Sep 6 10:06:55 2019 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 E6C35EEE84 for ; Fri, 6 Sep 2019 10:06:55 +0000 (UTC) (envelope-from SRS0=z+5a=XB=perdition.city=julien@bebif.be) Received: from orval.bbpf.belspo.be (orval.bbpf.belspo.be [193.191.208.90]) by mx1.freebsd.org (Postfix) with ESMTP id 46PtWf3lSwz47nR for ; Fri, 6 Sep 2019 10:06:53 +0000 (UTC) (envelope-from SRS0=z+5a=XB=perdition.city=julien@bebif.be) Received: from home.lan (unknown [77.109.105.33]) by orval.bbpf.belspo.be (Postfix) with ESMTPSA id E8EB91D4FC2C for ; Fri, 6 Sep 2019 12:06:50 +0200 (CEST) Date: Fri, 6 Sep 2019 12:06:49 +0200 From: Julien Cigar To: freebsd-questions@freebsd.org Subject: gpart bootcode for MBR + ZFS? Message-ID: <20190906100649.GH38457@home.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tcC6YSqBgqqkz7Sb" Content-Disposition: inline User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 46PtWf3lSwz47nR X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of SRS0=z@bebif.be designates 193.191.208.90 as permitted sender) smtp.mailfrom=SRS0=z@bebif.be X-Spamd-Result: default: False [-6.87 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_DN_NONE(0.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[julien@perdition.city,SRS0=z@bebif.be]; RCVD_NO_TLS_LAST(0.10)[]; RECEIVED_SPAMHAUS_PBL(0.00)[33.105.109.77.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:2611, ipnet:193.191.192.0/19, country:BE]; SUBJECT_ENDS_QUESTION(1.00)[]; TAGGED_FROM(0.00)[5a=XB=perdition.city=julien]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_NEQ_ENVFROM(0.00)[julien@perdition.city,SRS0=z@bebif.be]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[perdition.city]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-2.89)[ip: (-8.68), ipnet: 193.191.192.0/19(-4.34), asn: 2611(-1.43), country: BE(-0.01)]; RCVD_IN_DNSWL_NONE(0.00)[90.208.191.193.list.dnswl.org : 127.0.10.0]; RCVD_COUNT_TWO(0.00)[2] 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, 06 Sep 2019 10:06:56 -0000 --tcC6YSqBgqqkz7Sb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, It's a long time since I had to deal with MBR partition scheme.. I had to replace a disk (ada1) in an old machine with the following partition scheme: ~/ gpart show =3D> 63 4294967232 ada0 MBR (3.6T) 63 1 - free - (512B) 64 4294967224 1 freebsd [active] (2.0T) 4294967288 7 - free - (3.5K) =3D> 0 4294967224 ada0s1 BSD (2.0T) 0 4194304 1 freebsd-zfs (2.0G) 4194304 67108864 2 freebsd-swap (32G) 71303168 4223664048 4 freebsd-zfs (2.0T) 4294967216 8 - free - (4.0K) =3D> 63 4294967232 ada1 MBR (3.6T) 63 1 - free - (512B) 64 4294967224 1 freebsd [active] (2.0T) 4294967288 7 - free - (3.5K) =3D> 0 4294967224 ada1s1 BSD (2.0T) 0 4194304 1 freebsd-zfs (2.0G) 4194304 67108864 2 freebsd-swap (32G) 71303168 4223664048 4 freebsd-zfs (2.0T) 4294967216 8 - free - (4.0K) I did the usual:=20 $> gpart backup ada0 | gpart restore -F ada1 $> gpart backup ada0s1 | gpart restore -F ada1s1 $> gpart bootcode -b /boot/boot0 ada1 My question is: is it enough or do I need to dd /boot/zfsboot somewhere =2E.? ZFS pools are: ~/ zpool status pool: bootpool state: ONLINE status: Some supported features are not enabled on the pool. The pool can still be used, but some features are unavailable. action: Enable all features using 'zpool upgrade'. Once this is done, the pool may no longer be accessible by software that does not support the features. See zpool-features(7) for details. scan: resilvered 183M in 0 days 00:01:40 with 0 errors on Fri Sep 6 11:1= 3:54 2019 config: NAME STATE READ WRITE CKSUM bootpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada0s1a ONLINE 0 0 0 ada1s1a ONLINE 0 0 0 errors: No known data errors pool: zroot state: ONLINE status: One or more devices is currently being resilvered. The pool will continue to function, possibly in a degraded state. action: Wait for the resilver to complete. scan: resilver in progress since Fri Sep 6 11:11:33 2019 410G scanned at 138M/s, 210G issued at 70.9M/s, 632G total 210G resilvered, 33.21% done, 0 days 01:41:39 to go config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada0s1d ONLINE 0 0 0 ada1s1d ONLINE 0 0 0 errors: No known data errors and I have the following in loader.conf: vfs.root.mountfrom=3D"zfs:zroot/ROOT/default" zfs_load=3D"YES" zpool_cache_load=3D"YES" zpool_cache_name=3D"/boot/zfs/zpool.cache" zpool_cache_type=3D"/boot/zfs/zpool.cache" Thank you! Julien --=20 Julien Cigar Belgian Biodiversity Platform (http://www.biodiversity.be) PGP fingerprint: EEF9 F697 4B68 D275 7B11 6A25 B2BB 3710 A204 23C0 No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. --tcC6YSqBgqqkz7Sb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE7vn2l0to0nV7EWolsrs3EKIEI8AFAl1yL7gACgkQsrs3EKIE I8CnTRAAudk2AwT9fnmd6L1HE8kfIPy/IlznKKJ1RT93n+ngdCryIRRMzLyiNv+f YBlVlYPq//lVAePD6MGOHtURkn6g5XXyj0aRmqlStIiTV3uZIopWaj+jV1vIWphP 2cTmhL3nBE3FlOhk1ivMW4wLvE/HGUMpi9i1wiBkB3lnDXDHDIfFYfRFc4bnV5LQ 6XcPf/81g+xMU1KncoP3Ri1636sF30hgeR9O/7TGhlmuIIhN7X9yp9DQc9iqd81u P3wYwK5NN3XSP0tnMyU/4dOKbSa9TnUp6hRwRws3kZDoUZCO9PpOqYDnLfYYwyGf m793ITxkRXOYdJ80ESRi3p/sn5SMieGgxKKH8BpizlEWsMG0BlBXFA2db0Erx9Gf RtEmMm5FyiTSj8KtOgGDTAWsFWe5Bor4QupvKez54L7LBUFQEBOiTkQwMNd4YyU9 ZExe4FS5d1/cMssSr9+IkRpTnh/52gBHvTmmbGEeLxO/DhY6r3YL3wWW/274vXQu rPgnS9HkaNdRVzSYb0+iTE9Evx0GRZZdSMh4+q+YvVoz3QCLEf1f7w/+M9dS8MRn 1ZDi2RIp2aXOLHnaRFWhEbsx9lgw/zRHXc1/eFfOW0ADk+CvbbIRPJLxJM+UPd+z gMUFlfeyjD69lDRTW35bOs06me/QDN7yqQg4/z+SrBPJda1u7hw= =r5A0 -----END PGP SIGNATURE----- --tcC6YSqBgqqkz7Sb--