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

Disabling swap in kubernetes tutorial #1205

Open
krisiasty opened this issue Sep 21, 2020 · 1 comment
Open

Disabling swap in kubernetes tutorial #1205

krisiasty opened this issue Sep 21, 2020 · 1 comment
Labels
P2 Medium Priority

Comments

@krisiasty
Copy link

Describe the error/improvement to an existing document or image
One of the prerequisites described in the kubernetes tutorial page is disabling swap.

Unfortunately, the proposed way to do that does not properly mask systemd service var-swapfile.swap, which is responsible for mounting default swap file (/var/swapfile).

The swapoff -a command disables swap temporarily, but after system is rebooted the unmasked /var/swapfile is again mounted.

The simplest solution would be to add another command to explicitly mask var-swapfile.swap unit:

sudo systemctl mask $(sed -n -e 's#^/dev/\([0-9a-z]*\).*#dev-\1.swap#p' /proc/swaps) 2>/dev/null
sudo systemctl mask var-swapfile.swap 2>/dev/null
sudo swapoff -a

Screenshots
If applicable, add screenshots to help explain the error or unexpected behavior.

Environment (please complete the following):

  • Clear Linux OS version: 3372

Additional context

@krisiasty krisiasty added the P2 Medium Priority label Sep 21, 2020
@github-actions
Copy link

Welcome to Clear Linux* OS Docs. Thanks for submitting your first issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Medium Priority
Projects
None yet
Development

No branches or pull requests

1 participant