I often need to reinstall my system, but I want to keep the data on the other disks.
If I manually go from release to deployed without changing anything, the original data disk will be formatted. I know I can workaround this by removing the machine disk from maas, but that’s not the best way to do it.
Is there a better solution? THX
Need help!!!!!!!!!!!!!!!!
Hi @maristelsksk .
The first thing that comes to my mind is to delete the disk from the machine using the UI or the CLI.
Then, when you deploy the machine you can use a cloud-init custom script like
#!/bin/sh
echo "== User custom script start =="
echo "UUID=<uuid> /data ext4 defaults 0 2" >> /etc/fstab
mkdir /data
mount -U <uuid> /data
echo "== User custom script done =="
You can retrieve the UUID by running
sudo blkid
Does this help? Of course you have to modify the script according to your setup.
Btw, In case you don’t know, Canonical provides enterprise support and consultancy for MAAS (you can read more here).