I would like to have a setting, where Ubuntu Server is installed and booting from a flash drive (SanDisk Cruzer Fit 8GB), with two HDDs running in RAID1 and 4 drives running with RAID0 (only 1 drive at the beginning and adding up more over time). All drives, except for the pen drive should be encrypted and decrypted when booting up the system, thus, unplugging the pen drive would render the whole system useless. There should be a backup of the pen drive somewhere, just in case the pen drive burns down.
All HDDs should run LVM2. All the writing of files should be on the HDD and only on very rare occasions on the flash drive, since it is really slow.
If I install the Ubuntu server onto the flash drive, how do I know and prevent programs from writing a lot onto the drive? Is there a way to seize all writing at all. Furthermore, how would I encrypt both RAID1 and RAID0 with an encryption, where the pen drive acts as the key/passphrase.
Any good reading material/tutorial is very welcome.