OpenPli 4.0 : Create Swap

Posted by: Admin

OpenPli 4.0 : Create Swap - 01/09/16 07:02 PM

This is the way to create a SWAP on your DM running OpenPLi 4.0 from MastaG,

Code:
dd if=/dev/zero of=/media/usb/swapfile bs=1048576 count=128; mkswap /media/usb/swapfile
sed -i '/usb\/swapfile/d' /etc/fstab; echo -e '/media/usb/swapfile swap swap defaults 0 0' >> /etc/fstab
swapon /media/usb/swapfile


Enjoy,

Admin
Posted by: Gennariello

Re: OpenPli 4.0 : Create Swap - 01/09/16 11:01 PM

I did all the steps but does not start swapping.
I tried to install the attached file (dvbapp2-plugin-extentions-swapmanager2-01.r1.ipk) but does not install anything.
I have a 800hd with openpli4.0 v.12 (sim japhar)
How can I do ??
Posted by: Gennariello

Re: OpenPli 4.0 : Create Swap - 01/12/16 02:34 AM

root@dm800:~# swapon /media/usb/swapfile
swapon: error while loading shared libraries: libsmartcols.so.1: cannot open shared object file: No such file or directory
Help me
Posted by: Toysoft

Re: OpenPli 4.0 : Create Swap - 01/12/16 05:03 AM

Check this .sh script,

TS
Posted by: balocco

Re: OpenPli 4.0 : Create Swap - 01/13/16 02:46 PM

thank you toysoft, were i do insert that script?
Posted by: Admin

Re: OpenPli 4.0 : Create Swap - 01/13/16 02:56 PM

You copy into /tmp, change attributes to 755 (chmod 755 + name of file), and execute it.

Admin
Posted by: Gennariello

Re: OpenPli 4.0 : Create Swap - 01/14/16 12:08 AM

The swap file it is created but not activated frown
root@dm800:~# swap.sh

***********************
* FOUND *
***********************

---------------------------------------------------------------
rm: can't remove '/media/usb/swapfile': No such file or directory
Creating swapfile on /media/usb with 256MB
Setting up swapspace version 1, size = 268431360 bytes
UUID=e95e9b34-fbb7-4dbe-8ead-6c90e662edb6
swapon: error while loading shared libraries: libsmartcols.so.1: cannot open sh
red object file: No such No such file or directory
---------------------------------------------------------------
Swapfile activated
---------------------------------------------------------------
root@dm800:~#

Posted by: Toysoft

Re: OpenPli 4.0 : Create Swap - 01/14/16 01:57 AM

Funziona per me,

TS

Code:
root@dm800:/var/volatile/tmp# ./swap.sh

***********************
*  FOUND *
***********************

---------------------------------------------------------------
rm: can't remove '/media/hdd/swapfile': No such file or directory
Creating swapfile on /media/hdd with 128MB
Setting up swapspace version 1, size = 134213632 bytes
UUID=7b773d97-6204-46c3-8002-cb828d15c0a4
---------------------------------------------------------------
Swapfile activated
---------------------------------------------------------------
root@dm800:/var/volatile/tmp# cd /media/hdd

root@dm800:/media/hdd# ls swapfile -l
-rw-r--r--    1 root     root     134217728 Jan 13 18:52 swapfile



Posted by: Gennariello

Re: OpenPli 4.0 : Create Swap - 01/14/16 09:03 PM

Si adesso funziona tutto anche a me. Ho dovuto rifleshare. Grazie
Adesso sono soddisfatto. ciaoo
Posted by: peco

Re: OpenPli 4.0 : Create Swap - 11/27/19 01:41 PM

Thank you for swap.sh, but how do I know if a swap is active?
The free command does not work.
Thank you.
Posted by: Admin

Re: OpenPli 4.0 : Create Swap - 11/27/19 01:57 PM

Check if you have a swap file in /hdd or /usb,

Admin
Posted by: peco

Re: OpenPli 4.0 : Create Swap - 11/27/19 03:28 PM

Thank you.
Code:
root@dm800:/media/hdd# ls swapfile -l
Posted by: Admin

Re: OpenPli 4.0 : Create Swap - 11/27/19 11:05 PM

Thank you for your feedback !

Admin