after installation of my TrueNAS SCALE system the System Dataset was located on my SSD Boot Pool. After I created a RAIDZ3 pool for my data, TrueNAS automatically changed the location of the System Dataset to the RAIDZ3 HDD pool.
Which logic exactly does TrueNAS use to decide about the location of the System Dataset? Is it always the pool with the best redundancy?
The root dataset of the first pool you create automatically becomes the system dataset in TrueNAS SCALE. This means that after you create your first data pool, TrueNAS will move the system dataset to that pool. The decision is not necessarily based on redundancy but rather on the order of pool creation.
If you want to change the location of the system dataset, you can do so manually by selecting a different pool from the System Dataset Pool dropdown in the TrueNAS web interface under System > System Dataset.
Your system dataset is most important when you need to rebuild your system drive, and when you need to rebuild your system drive you won’t have access to whatever drive you have it located on.
You might want to implement @joeschmuck 's Multi-Report script which (aside from emailing you drive health information) can also send you the system configuration file as a backup.