I’ve been running TrueNAS SCALE servers for quite some time. My current one is on a Dell R730xd with mirrored SSD boot drives, booting with UEFI, PERC H330 in HBA mode.
I had a bad experience in on an older server with same mirrored boot config where the primary boot drive failed. I was able to hot swap a replacement and re-add to the pool and all was good until the next reboot. Adding to the pool does not ensure a boot loader is installed, so the server could not boot. I swapped the drive positions and server rebooted ok.
Fast forward to today, what actions can I take to prevent this scenario should I have another boot drive failure? e.g. I can swap the drives but one day that drive might later fail, too. Should I run grub-install
a certain way on the replacement drive or is there a better approach?
If I’m reading this correctly;
-you have mirror boot drives
-one of the mirrored drives failed
-you managed to successfully hot swap a replacement
-reboot fails until boot drive positions physically swapped
Realistically mirror boot drives don’t solve ‘reboot’ failures - your bios can still have issues trying to boot from a previously failed boot drive, even though you have a working mirrored drive. This’d still require you to either physically move the drives, or change bios setting to pick the working drive.
Mirrored boot drives are more of an ‘uptime convenience’ (because if single, non-mirrored, boot drive fails, your system will likely crash) instead of an ‘immediate smooth reboot convenience’.
I think on the old forms someone had a voodoo post on making a mix of a raid + zfs mirror boot drive (which is normally in no way recommended) that would get around this problem, but otherwise, the way you have things set it more or less working as intended.
edit: I find that having boot drives connected directly to motherboard instead of through an HBA reduces the chance that motherboard has issues randomly selecting a working boot drive - maybe this was the answer you were looking for.
It seems to me that a freshly installed TrueNAS installed the bootloader on both mirrored drives. I would like to restore that configuration after a drive replacement without reinstallation.