Fix fsn.yml: mount GP2 volume as dedicated /home partition #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The AWS template (fsn.yml) creates an instance with an unused 300GB GP2 volume (/dev/xvdh). The node is running on the root partition (/dev/xvda1) with just ~6GB of free space though, which will lead to the catastrophic failure of every AWS node created based on the current instructions in the not so distant future, which in turn will cause the retreat of large amounts of tickets. Additionally, this currently causes unncessary costs of around $30/month.
Default system layout:
ubuntu@ip-172-31-14-6:~$ df -h | grep xvd
/dev/xvda1 7.7G 1.9G 5.9G 24% /
Using the volume requires additional setup:
root@ip-172-31-14-6:/home/ubuntu# sudo su root
root@ip-172-31-14-6:/home/ubuntu# mkfs.ext4 -q /dev/xvdh
root@ip-172-31-14-6:/home/ubuntu# mount /dev/xvdh /mnt/
root@ip-172-31-14-6:/home/ubuntu# df -h | grep xvd
/dev/xvda1 7.7G 1.9G 5.9G 24% /
/dev/xvdh 296G 63M 281G 1% /mnt
Note that 300GB is quite a lot already, this could be set to a lower value as the volume size can be increased while the system is running later if necessary.
The proposed change actually mounts the volume as dedicated /home partition while preserving the directory contents (otherwise it wouldn't be possible to login anymore as the default user's home directory, including its SSH key, would be missing).
It has been tested on live AWS instances according to the instructions in the official setup guide.
Note that this doesn't fix existing instances. I'll integrate a fix for that in my node manager.
Type of change
Checklist:
npm run test
with success and extended the tests if necessary.npm run build
and tested the resulting file fromdist
folder in a browser.