I’ve a single 256GB SSD for my boot drive/boot pool. For various reasons to do with being unable to easily run the Scale installer at the moment (bug report submitted recently, please see below), I wish to create a clone or a mirror of this boot SSD so the resulting “spare” can be kept safe in a drawer and yet easily swapped out should the existing SSD fail (which I realise unlikely, but it is possible).
I had to reinstall Scale yesterday so now seems a good time to work out how to achieve this goal.
If I were to use Scale’s UI there seems to be a couple of approaches:
1 - system settings | boot | boot environment
I can select the single entry and press the three dots and select “clone” but I don’t know what it does and I am too nervous to fiddle.
2 - system settings | boot | boot pool status |
I can select the three dots and choose “replace” or “attach” but again I don’t know what it’s for.
In general, if I somehow “mirror” the boot pool onto a second SSD and then remove that second SSD, will trueNAS function using the original SSD and will it later function using the removed disk if I swap it?
I have read on the forums and elsewhere and I’ve seen a couple of YT videos but I am not convinced I understand party because my terminology isn’t accurate.
Normally, I’d not worry because have downloaded my config and secrets I would simply reinstall TN Scale to this new SSD but as mentioned, there are problems I can’t over come at the moment (see URLs below).
This is excellent news and it sounds easy, even for me! Just to make sure I haven’t got the wrong end of the stick, this is what I think I should do:
1 - connect an external SSD (it’ll be my “spare”) via a SATA/USB dock
2 - go to “system settings | boot | boot pool status |” and “attach” the existing boot pool to this external SSD
3 - remove the external SSD, which is now my spare boot/OS and stick it somewhere safe
4 - if the existing boot SSD fails, power down and fit the “spare” instead.
Have I got it right?
(Separately I have just watched your superb video “Setting up and using Tiered Snapshots” and I had no idea that the functionality could be set up in such an effective way. I shall start looking at (e.g.) NILFS2 for implementing the Windows shadow copy approach which you showed, but in Linux Mint).
3 - remove the external SSD, which is now my spare boot/OS and stick it somewhere safe
Yes. And once you’ve done that you can then remove the “attached” but not removed SSD from the boot pool. It will be marked as “REMOVED” but still present. If you boot with the 2nd SSD installed, it will update the mirror.
The issue is that it will annoy you by saying your boot pool is degraded whilstever the the other SSD is “missing”
BUT you do know that you could just save your config file as well. You can always re-install truenas, and upload your config.
So maybe just keep the mirror installed?
Also, you can make multiple boot environments, ie you can clone your current environmenet at any time.
4 - if the existing boot SSD fails, power down and fit the “spare” instead.
Yeah. Of course… you could also leave you “spare” in place…
Lots of options really.
(Separately I have just watched your superb video “Setting up and using Tiered Snapshots” and I had no idea that the functionality could be set up in such an effective way. I shall start looking at (e.g.) NILFS2 for implementing the Windows shadow copy approach which you showed, but in Linux Mint).
Excellent instructions. This made complete sense and I was able to proceed, except I can now see I’ve miscalculated the size of the “spare” disk by a couple of GB.
I’ll work out what to do on the original SSD whose structure is shown below. Via parted I expect I can either delete or reduce the size of the partition 3 whilst leaving the remaining boot and swap parts alone) so that it’ll fit.
Number Start End Size File system Name Flags
1 2097kB 3146kB 1049kB bios_grub, legacy_boot
2 3146kB 540MB 537MB fat32 boot, esp
4 540MB 17.7GB 17.2GB swap
3 17.7GB 256GB 238GB zfs
Thanks again for the detailed explanation and help. Once my problem relating to an inability for some users to be able to run the TrueNAS installer is overcome (“sda3 not a block device”), none of this will be necessary but in the mean time it is an interesting area to learn about and backups are always a good idea!