ZFS...
Miroslav Lachman
000.fbsd at quip.cz
Wed May 8 23:17:43 UTC 2019
Pete French wrote on 2019/05/03 14:28:
>
>
> On 03/05/2019 13:11, Miroslav Lachman wrote:
>
>> I had this problem in the past too. I am not sure if it was on Dell or
>> HP machine - controller presents first disk only in the boot time so I
>> created small (10 - 15GB partition) on each disk and use them all in 4
>> way mirror. Cannot say if it was gmirror with UFS or ZFS mirroring.
>> The rest of the each disk was used for ZFS RAIDZ.
>
> Snap :-) Thats exactly what I have done - but the bits you cant mirror
> are the GPT partititons for bootcode. I was fiddling with hose of da0
> without realising it was now using da1 to boot. If it ever chooses da2
> or da3 then I will need to mirror it there too, so I have it partitioned
> like that, but am currently using those as swap as it shows no signs of
> wanting to boot from them for now.
Time for some scripting :) This is what I have on the machine with weird
controller
# cat bin/zfs_bootcode_update.sh
#!/bin/sh
devs="ada0 ada1 ada2 ada3"
for dev in $devs
do
echo -n "Updating ZFS bootcode on ${dev} ..."
if ! /sbin/gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i
1 ${dev} > /dev/null; then
echo " error"
exit 1
fi
echo " done"
done
So it should be able to boot from any installed drive, no matter the order.
Miroslav Lachman
More information about the freebsd-stable
mailing list