I created an EC2 instance of
r5ad.xlarge and installed Jenkins on it. However, after a few jobs I configured and ran I saw a warning about no space left. Then realised Jenkins was installed on 8 GB drive and that it's a non-persistent drive.
1st try: After reading on the subject I changed the 2 volumes of the machine with
modify-instance to be
DeleteOnTerminate to false and copied Jenkins to the bigger disk and configured auto-mount, following this and this. Then I stopped and started the machine and everything got deleted from the disk.
2nd try: So I defined a new EBS volume (SSD gp2)(with this article) and attached it to the instance. Again with
DeleteOnTerminate=false, formatted then setup auto mount and copied Jenkins directory. Stopped and Started the machine, again everything gone...
What am I doing wrong? How do you make the attached volume persistent?