Create home and var folders in folders, as well as partitions

Windsurfer
  1 week ago
  -2
  Under review

I have a server with a NVMe  root and a RAID 10 drive attached. During installation it It would be useful if the /home and /var folders could be soft links to the RAID array, say md0, rather than partittions.


It is easy to copy the /home folder to the RAID array, rename the /home to /home_old, create a link to md0/home and move the link to /. This works well. However, moving /var in the same way breaks th esystem.


Process:


After booting from USB or DVD with an install ISO, and before installation, mdadm can be installed with sudo apt install mdadm.


If there is only one, the existing RAID array can be re-assembled with sudo --assemble --scan.


A home folder and a var folder can be created there.


It would be nice if there were a way tto automate this, and complete the installation.


Summary


Perhaps the ability to create home and var folders on other devices or drives rather than forcing the creation of partitions would be enough. Softlinks would be quite sufficient for my purposes.