kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Alternate method of running swapon?
@ 2020-01-08 18:09 Jeffrey Walton
  2020-01-08 18:23 ` Valentin Vidić
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jeffrey Walton @ 2020-01-08 18:09 UTC (permalink / raw)
  To: kernelnewbies

Hi Everyone,

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
/sbin/swapon
# file /sbin/swapo
swapoff  swapon
# 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,
BuildID[sha1]=a4891bc4dcfc533c61d76aa3e69870ab35d90c89, stripped

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
command?

Thanks in advance.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-01-08 22:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 18:09 Alternate method of running swapon? Jeffrey Walton
2020-01-08 18:23 ` Valentin Vidić
2020-01-08 18:33   ` Jeffrey Walton
2020-01-08 18:42     ` Valentin Vidić
2020-01-08 20:08       ` Jeffrey Walton
2020-01-08 20:28         ` Valentin Vidić
2020-01-08 18:26 ` Bernd Petrovitsch
2020-01-08 22:23   ` Jeffrey Walton
2020-01-08 18:31 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).