Fixing the Swap Partition
Overview
In versions 3.3.0
- 3.4.3
of SFTP Gateway, the swap partition exists upon creation of your VM. However, after stopping or restarting the VM, the swap partition will be missing.
This is due to /var/lib/cloud/scripts/per-boot/create_swapfile.sh
missing the line #!/bin/sh at the top of the file.
Loss of swap partition can be an issue if your memory is being highly uitilized, although it isn't a major issue.
This issue will be resolved in version 3.4.4
of SFTP Gateway.
Solution
To manually fix the issue, SSH into your VM on port 2222 & elevate your privileges:
sudo su
Change directories & edit the swapfile:
cd /var/lib/cloud/scripts/per-boot/
nano create_swapfile.sh
Add this line at the top of the swapfile:
#!/bin/sh
Save the changes to the swapfile, then restart the instance so it will have the swap partition on boot.