[Users] fake swap != 0 in VE?

Michael Klatsky michaelk at tnrglobal.com
Mon Feb 11 16:08:12 EST 2008


We have, unfortunately, run into a similar situation.

Our app requires swap as well, and, while you can set up a VE such
that issuing 'free' will show both RAM and swap- it will be that of
the HN. And, unfortunately, our app requires swap to be seen as part
of the VE, as in issuing a 'df'. I have tried making a swapfile and
mounting (swapon) with the same errors. It doesn't appear possible for
the VE to really show swap. Unfortunately, for our particular app, we
may need to use XEN.

On 2/11/08, Thomas Sattler <sattler at med.uni-frankfurt.de> wrote:
> Alexander Prinsier wrote:
> > 1) I's say that software sucks. You better somehow disable the check,
> > even if it requires editing the code.
>
> It's a closed source application, I can't do anything here. This
> really sucks. Perhaps its developers will have a look, perhaps
> they won't. :-/
>
> > 2) Perhaps you could use a file as swap instead of a normal swap
> > partition (google for that). You can make the size of that file really
> > small. However I'm really not so sure that you can mount a swap file in
> > openvz. It's worth a try.
>
> I know about swapfiles. But swap is a system global thing and
> must be done in the HN not in the VE's:
>
> # dd if=/dev/zero of=swap bs=1M count=32
> 32+0 records in
> 32+0 records out
> 33554432 bytes (34 MB) copied, 0.075684 seconds, 443 MB/s
>
> # mkswap swap
> Setting up swapspace version 1, size = 33550 kB
>
> # swapon swap
> swapon: swap: Operation not permitted
>
> BTW: The HN uses swap:
>
> # cat /proc/swaps
> Filename                                Type            Size    Used
> Priority
> /dev/md1                                partition       3903672 0       -1
>
> It's only that the VE's don't know about that. So I need to
> tell them -- or fake it. That's what I asked for.
>
> Thomas
> _______________________________________________
> Users mailing list
> Users at openvz.org
> https://openvz.org/mailman/listinfo/users
>


-- 


Sincerely,

Michael Klatsky


More information about the Users mailing list