Alternate method of running swapon?
noloader at gmail.com
Wed Jan 8 13:09:23 EST 2020
I work with an open source project. We have a VM but it is low-end.
The machine suffers OOM kills. We don't have access to /etc/fstab.
Everything is an upsell with the VPS provider.
I'm trying to setup a swapfile during startup using Systemd but:
# swapon /swapfile
swapon: /swapfile: swapon failed: Operation not permitted
This may be useful:
# command -v swapon
# file /sbin/swapo
# file /sbin/swapon
/sbin/swapon: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.32,
My question is, is there a way to sidestep the restriction? Is it
possible to ask the kernel to use the swapfile without using the
Thanks in advance.
More information about the Kernelnewbies