Date: Fri, 3 Apr 2020 21:44:52 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> To: Artem Kuchin <artem@artem.ru>, freebsd-fs@freebsd.org Subject: Re: gpart bootcode Operation not permitted Message-ID: <159cf2f5-1898-019e-9f02-29750ff7fa7e@quip.cz> In-Reply-To: <1605a04a-ad2c-5b2c-445f-fb8ccd7211d6@artem.ru> References: <27955efa-01f2-88f6-6a28-d9d8a62dfa2a@artem.ru> <a4a5e7dc-3234-add9-4c2e-8c55a38d6e83@quip.cz> <c1856b2c-8f0e-ab1c-9ec7-d62a10b696b2@artem.ru> <48ba23fa-13dc-4a74-579c-2028479f302a@quip.cz> <1605a04a-ad2c-5b2c-445f-fb8ccd7211d6@artem.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Artem Kuchin wrote on 2020/04/03 21:23: > 03.04.2020 17:42, Miroslav Lachman пишет: >> >> I think you can use "gmirror stop" on boot partition, then "gmirror >> clear" and then update both individual boot partitions by gpart. >> >> > > I am afraid to do it. Gmirror stops mirroring, okay. What what gmirror > clear does? What metadata is cleared and what it is used for? > > How to restart mirroring after that and how to make sure that mirror is > 100% complete? > > Is it possible to exclude only boot partition from mirroring? Of course that's what I am suggesting - just split up mirroring of boot partition and keep mirroring on swap and root! Gmirror clear deletes the very last sector on the given partition where metadata of gmirror are stored. It does not touch the data on the partitions. You don't need to worry. You have 3 mirrors. They are visible in /dev/mirror or by command "gmirror status": boot swap root As the "man gmirror" shows: gmirror stop [-fv] name ... You can run: gmirror stop -v boot It stops only the "boot" mirror. swap and root are still mirrored. Then you can clear metadata on each provider: gmirror clear ada0p1 gmirror clear ada1p1 Or you can use "gmirror destroy -v boot" istead of 3 command above. It should stop the "boot" mirror and then clear metadata on both providers. The you will have / your system will use 2 independent boot partitions: ada0p1 and ada1p1. The machine should be able to boot from any of those 2 disks because each of them has valid boot partitions / boot code. Gpart bootcode should work for them on each system upgrade. gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada1 Kind regards Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?159cf2f5-1898-019e-9f02-29750ff7fa7e>