Boot mirror with mismatched devices?

darrenbest

Dabbler
Joined
Apr 7, 2012
Messages
33
I am currently using an old 80GB SATA SSD drive as my boot device. I would like to mirror the boot device, but I don't have another spare SATA port on the motherboard. Also I have little spare cash. The motherboard has an internal USB port. Can I plug a flash drive of equal-or-greater capacity, and point to it as the target for the boot mirror?

This server isn't mission critical. I realize this isn't "best practice", but I'd like to be able to have the machine still boot in a pinch if the SSD dies. Will this work? And if it will, is this more robust than my current non-mirrored boot drive, or would I just be introducing a point of failure that might make things worse to recover from?
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
I'd use a USB-to-SATA adaptor and another SSD personally. USB flash drives are often made from bottom-of-the-barrel NAND that burns out fast.

This server isn't mission critical. I realize this isn't "best practice", but I'd like to be able to have the machine still boot in a pinch if the SSD dies. Will this work? And if it will, is this more robust than my current non-mirrored boot drive, or would I just be introducing a point of failure that might make things worse to recover from?

It will work but the USB device robustness would be my primary concern. Won't necessarily be making reliability worse but it could cause slowness if the USB device decides to choke or croak.

@jgreco outlined a very-overkill-for-your-scenario highly available boot strategy in a resource:


However, you might be able to have a good solution by taking routine backups of your config database (export configuration) to a separate server, and having a "freshly installed, first-booted, but never configured" copy of TrueNAS on an alternate SSD or even HDD. If the worst happens, you swap the boot device, start up, and reload your config.
 

darrenbest

Dabbler
Joined
Apr 7, 2012
Messages
33
It will work but the USB device robustness would be my primary concern. Won't necessarily be making reliability worse but it could cause slowness if the USB device decides to choke or croak.
This is kind of what I was afraid of.

I am absolutely expecting that a new USB drive will be much less reliable as a boot device than my old SATA SSD, that wasn't in question. I was going on the theory, though, that it would be an operational insurance policy in case the SSD *does* die, and you've seemed to confirm that it would be. In the case that the SSD dies, my system would still function with the USB drive as the boot device in the short term until I replace the SSD (which is all I'm looking for).

But are you saying that if a mirrored boot device fails, it will degrade the performance of the system until the failed boot device is replaced? If so, would this be true only if the failed drive is a cheap USB? Or would the performace of the system also suffer if one of two identical mirrored SSD drives failed? Because I was hoping that the OS would simply make note of the loss of the mirror and continue on with the single boot device (as I have it currently configured).
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
I am absolutely expecting that a new USB drive will be much less reliable as a boot device than my old SATA SSD, that wasn't in question. I was going on the theory, though, that it would be an operational insurance policy in case the SSD *does* die, and you've seemed to confirm that it would be. In the case that the SSD dies, my system would still function with the USB drive as the boot device in the short term until I replace the SSD (which is all I'm looking for).
If rebooting, you might have to manually override the boot order from SATA to USB - if your SATA device is alive enough to be detected by your BIOS/EFI as "bootable" but is actually corrupt or the NAND is dead, your system won't necessarily fail over to the USB with no further interaction. But a running system should continue to function in that case.

But are you saying that if a mirrored boot device fails, it will degrade the performance of the system until the failed boot device is replaced? If so, would this be true only if the failed drive is a cheap USB? Or would the performace of the system also suffer if one of two identical mirrored SSD drives failed? Because I was hoping that the OS would simply make note of the loss of the mirror and continue on with the single boot device (as I have it currently configured).
There's the potential that updates to the config, or the responsiveness of the webUI, would be slow (or fail entirely) because USB devices don't tend to fail gracefully. They tend to just hang up controllers and refuse to ever return "Whoops, I failed" to a command in a reliable or rapid manner. SATA/SAS devices are typically better at this, and would get kicked out of the boot-pool by ZFS fairly quickly.

Mirrored SATA? Fine. Mirrored SATA/USB and the SATA fails? Probably fine as well.

Mirrored SATA/USB and the USB fails? Depends if the USB device is polite enough to kill itself both quickly and completely enough for ZFS to catch it before the webUI/SSH sessions choke up. Might not impact pool throughput, but an unmanageable system isn't exactly a healthy one.
 

darrenbest

Dabbler
Joined
Apr 7, 2012
Messages
33
If rebooting, you might have to manually override the boot order from SATA to USB - if your SATA device is alive enough to be detected by your BIOS/EFI as "bootable" but is actually corrupt or the NAND is dead, your system won't necessarily fail over to the USB with no further interaction. But a running system should continue to function in that case.

There's the potential that updates to the config, or the responsiveness of the webUI, would be slow (or fail entirely) because USB devices don't tend to fail gracefully. They tend to just hang up controllers and refuse to ever return "Whoops, I failed" to a command in a reliable or rapid manner. SATA/SAS devices are typically better at this, and would get kicked out of the boot-pool by ZFS fairly quickly.

Mirrored SATA? Fine. Mirrored SATA/USB and the SATA fails? Probably fine as well.

Mirrored SATA/USB and the USB fails? Depends if the USB device is polite enough to kill itself both quickly and completely enough for ZFS to catch it before the webUI/SSH sessions choke up. Might not impact pool throughput, but an unmanageable system isn't exactly a healthy one.
Thank you, you've offered a thorough and reasoned response that addresses my questions.

With your advice in mind, I see that this will probably create more headaches (more often) than it avoids. A more robust boot mirror solution will cost more than I can afford, particularly on a non-mission-critical server. I will likely just leave well enough alone, and "deal with it" the normal way if the SSD ever dies (replace the SSD, reinstall, and restore the config). Thank you again.
 
Top