Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fsn.yml: mount GP2 volume as dedicated /home partition #52

Merged
merged 1 commit into from
Sep 28, 2019

Conversation

Iruwen
Copy link
Contributor

@Iruwen Iruwen commented Sep 27, 2019

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run test with success and extended the tests if necessary.
  • I ran npm run build and tested the resulting file from dist folder in a browser.
  • I have tested my code on the live network.

@JoeyKhd JoeyKhd merged commit 0251a5b into FUSIONFoundation:master Sep 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants