How do you mirror the os in pc with limited port

One thing I didn’t like about truenas is that they require the OS and the strorage pool to be separated. My PC has limited space available which is 1 nvme slot and 2 sata. I’m stuck with having nvme as the os and the 2 sata as storage pool because the sata port is the only way I can have two identical drive.

My question is do I need to mirror or just backup the os or clone the os drive to a cheaper drive e.g external usb sata? How often do you need to backup or clone the os. Do they change after booting?

It’s enough to backup the configuration. No need to backup the OS to another drive.

3 Likes

The restriction on only having the boot pool on the boot devices is a SUPPORT restriction. Sharing the boot drive with other pools is UNSUPPORTED and if you discover a bug as a consequence then you are on your own.

That said, given that you probably want an SSD for your boot drive and most SSDs are way way way way way bigger than the 16GB needed for TrueNAS, there is a strong incentive to make use of the rest of the boot drive for e.g. an apps pool.

My TrueNAS SCALE system has an apps pool on the same drive as the boot pool. Achieving this was easy. During installation, after boot and before the actual install, you need to go into a command line and edit the install script to create the boot pool as 16GB (or 24GB or 32GB) and leave the rest of the boot drive free. Once SCALE is installed, you can then create a new apps pool in the remaining space.

But, I know that this was unsupported and decided to accept the risks of being out of support. Since the original install, I have upgraded between Bluefin releases, upgraded again to Cobia and then upgraded between Cobia releases - all without any issues due to the boot drive having other pools on it.

I do, however, replicate the apps pool to an apps-backup dataset on my mail pool so that I can restore it in the event of a drive failure. (You can recreate the boot pool with a fresh install and a restore of the configuration file, but you need a backup of the other pools on the same non-redundant drive.)

FINALLY, I want to reiterate that using the boot drive to hold additional pools is UNSUPPORTED - and you do this at your own risk!!!

1 Like

P.S. To answer the original question about mirroring your boot drive…

  1. Your BIOS will most likely need to be configured to boot as standard from a specific drive - or you won’t have a choice.

  2. In the event of a complete drive failure, your BIOS may or may not switch automatically to the remaining mirror drive - or you may need to go into the BIOS to select the mirror drive as a boot device.

  3. In the event of a partial drive failure e.g. the EUFI partition is readable, but the TrueNAS is not bootable due to corruption of GRUB or the boot pool, then it is likely that the BIOS will not automatically switch to the mirror drive requiring you to go into the BIOS to select the mirror drive to boot off.

  4. I have never created a mirror boot drive however you will need to ensure that the non ZFS parts of the drive (boot sectors, primary and backup partition tables, GRUB, EUFI partition) are mirrored in addition to having mirrored ZFS pool(s) if you want to be able to boot successfully - I have no idea how easy or difficult it is to achieve this.

  5. In theory, you can probably script Grub to give improved resiliency if the primary copy of the boot pool is unavailable, but I have no idea whether TrueNAS does this for you or just how UNSUPPORTED you will make your system if you change Grub yourself (but likely a lot more unsupported than having other pool(s) on your boot drive).

If I were the OP I would wonder whether a board with a single M.2 slot and two SATA ports supports ECC RAM[1] before wondering about how to mirror my boot drive.


  1. if the answer is yes please post a link or a model number/name :heart_eyes: ↩︎

No; as Chuck says, a backup of the config file is all you really need. A good script to automate that (along with regular reports on drive and pool health) is this one:

But I’d seriously question how suitable a mini-PC is for TrueNAS in the first place.

3 Likes

There is absolutely zero need to backup the OS drive. This is the whole point of the config file, so recovery of the OS drive is trivial.

This is also the reason why the OS takes out the entire drive. This is to simplify config file recovery process. It doesnt need to worry about other arvitrary data that a user might have that it needs to recover. This is IMO one of the principle reasons why you’d use TrueNAS over something like Ubuntu server or vanilla FreeBSD. It is for that “appliance/firmware”-like behavior (reproducible state).

Other things you can do with the space… swap, l2arc and SLOG (as long as you’ve used a suitable drive, which is unlikely)

Not saying it’s a good idea, but it can be if that’s the compromise you’ve decided to go with.

Yes - I used some of the space for Swap.

I don’t have nearly enough memory nor a use case that requires L2ARC, and (even assuming I had synchronous writes i.e. NFS rather than SMB) I would be worried that SLOG is NOT a good idea unmirrored.