gpart bootcode Operation not permitted

Miroslav Lachman 000.fbsd at quip.cz
Fri Apr 3 14:42:53 UTC 2020


Artem Kuchin wrote on 2020/04/03 16:17:
> 03.04.2020 17:11, Miroslav Lachman пишет:
>> Artem Kuchin wrote on 2020/04/03 15:23:
>>> I am lost with this problem.
>>>
>>> I have gmirror:
>>>
>>> # gmirror status
>>>         Name    Status  Components
>>> mirror/boot  COMPLETE  ada0p1 (ACTIVE)
>>>                         ada1p1 (ACTIVE)
>>> mirror/swap  COMPLETE  ada0p2 (ACTIVE)
>>>                         ada1p2 (ACTIVE)
>>> mirror/root  COMPLETE  ada0p3 (ACTIVE)
>>
>> I you are mirroring boot partition why you need to write directly to 
>> individual partitions on both disk instead of mirror?
>>
>> I never used this setup. I mirrored swap, /root, /usr, /var but not 
>> boot partition. Then I write gptzfsboot to both ob them individually.
>>
>> Miroslav Lachman
>>
> I don't know :) It is a historical setup. I even would say that 
> mirroring swap is a bad idea, isn't it?

It depends on what you need to protect by mirroring. If you need it just 
to protect saved data (desktop usage) then you don't need to mirror swap.
If you need to stay up and running if some HDD failed (servers) then you 
need to mirror swap too. Or the system will panic.

> But i need to have a working boot code on both disks because in case of 
> failure i need to boot from any disk.

Yes you need to update boot code on each disk but as it is normally not 
modified you don't need to mirror it you just need to update it after 
system update / upgrade.

> Protective MBR is not mirrored anyway, so, need to install it 
> separatelly on each disk for sure. Installing boot code into
> 
> boot partion maybe can be done on mirror partition (or whatever it is 
> calleed mirror/boot) but then how do i address it

I think you can use "gmirror stop" on boot partition, then "gmirror 
clear" and then update both individual boot partitions by gpart.

Miroslav Lachman


More information about the freebsd-fs mailing list