Date: Fri, 6 Sep 2019 13:55:31 +0200 From: Julien Cigar <julien@perdition.city> To: freebsd-questions@freebsd.org Subject: Re: gpart bootcode for MBR + ZFS? Message-ID: <20190906115531.GI38457@home.lan> In-Reply-To: <20190906100649.GH38457@home.lan> References: <20190906100649.GH38457@home.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
--3U8TY7m7wOx7RL1F Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 06, 2019 at 12:06:49PM +0200, Julien Cigar wrote: > Hello, >=20 > 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: >=20 > ~/ 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) >=20 > =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) >=20 > =3D> 63 4294967232 ada1 MBR (3.6T) > 63 1 - free - (512B) > 64 4294967224 1 freebsd [active] (2.0T) > 4294967288 7 - free - (3.5K) >=20 > =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) >=20 > 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 >=20 > My question is: is it enough or do I need to dd /boot/zfsboot somewhere > ..? >=20 > ZFS pools are: >=20 > ~/ 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= :13:54 2019 > config: >=20 > 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 >=20 > errors: No known data errors >=20 > 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: >=20 > 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 >=20 > errors: No known data errors >=20 > and I have the following in loader.conf: >=20 > 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" >=20 > Thank you! >=20 > Julien =46rom what I understand I /boot/boot0 (or mbr) only provides stage 0, for stage 1 and stage 2 I should use: $> dd if=3D/boot/zfsboot of=3D/dev/ada1s1 count=3D1 $> dd if=3D/boot/zfsboot of=3D/dev/ada1s1a iseek=3D1 oseek=3D1024 However I'm getting a "Operation not permitted" even with kern.geom.debugflags=3D0x10 .. any idea? >=20 >=20 > --=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. --=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. --3U8TY7m7wOx7RL1F Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE7vn2l0to0nV7EWolsrs3EKIEI8AFAl1ySS0ACgkQsrs3EKIE I8B7rQ/9EQwiW4Rr+zsBYFCBaz7x5IL60wn+LZ0Xdvm6adP5gaMMQorpJNRTh5Me eygUSbqARYjHbZSdo8gRVWSckqBcrsZnEadPJCJFoL2KNE55zAkoBgir/kBLNRkA +Q3wZJwmNXsjoas8DQBt9NMVZcp/97RSEE0ydDry7z1SCqYAuK4BUcwu0Qv71SfE /S2YehN6DGb8eoSlDHZIGGIfXyWmBfzMAzHRdfjABuNgnEj7pf/9rt+YrSLL3MCw WUEvXcsQ2R/j7MulnkOPk73zTt156ljJs9KnOtyLOPEtouvKXFZtZr7IyjW9KgfS /7uDMGAQPK1NAUHH4cEeFZJpa5J9280pEk5cAzvtsfM6ArVTRK538uKzx4sRgbYK wcwpyTkuTkRoJTqEme7uPNMB5kE2Ky5VNKSAyVqNTF2sQNZGMtazVfP4fpnXnDtc P64Z3DW4RolSEzoig+ZxtpSOVLbeagOGrwXXvXCAiZCeFuihJ82UojZnQOKBZt91 EK1dDhgsBaWWMVRBVZcHFoltICZWxkY9IvyqhBXPtK+dapKA+PKl1lk2uGobezjB SAVqHI6BsZnDoTJAjvPT6UFmWn+UoNJbfh53nVaxo9NQgEJSzMLfo7BAcoRWIs1D T/q2hShl33TJFPbB9Xp1jg/cfLR+khLBnwUcSbn9wssOOaIhiag= =VtFw -----END PGP SIGNATURE----- --3U8TY7m7wOx7RL1F--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190906115531.GI38457>