[Users] Is this mkswap message from OpenVZ?

Paulo Coghi - Coghi IT paulocoghi at gmail.com
Wed Jan 8 23:01:31 MSK 2020


By default, OpenVZ doesn't allow swap creation inside containers. And this
is a good thing.

It is not good to use storage to act as memory, since the performance is
really bad. When needing more memory, just upgrade the hardware profile of
your VM with your provider.

On Wed, Jan 8, 2020 at 3:41 PM Jeffrey Walton <noloader at gmail.com> wrote:

> Hi Everyone,
>
> I'm trying to track down the cause of the error message below. It is
> encountered when we try to enable a swapfile for a low-end VM. The VPS
> provider uses OpenVZ.
>
>     # ./vm-swapfile.sh
>     Swapfile already allocated
>     swapon: /swapfile: swapon failed: Operation not permitted
>     Failed to enable swapfile
>
> The relevant command is:
>
>     if ! swapon /swapfile; then
>         echo "Failed to enable swapfile"
>     fi
>
> Is this mkswap message from OpenVZ?
>
> Thanks in advance.
> _______________________________________________
> Users mailing list
> Users at openvz.org
> https://lists.openvz.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/users/attachments/20200108/283fef58/attachment.html>


More information about the Users mailing list