Views: 10239
Last Modified: 31.03.2014

The BitrixVA virtual machine is supplied with a swap partition of 256 Mb, which is not connected in the ami image by default. That is why it may become necessary to extend the swap partition during operation.

As in the case with increasing free disk space, the simplest way is to add another disk and place swap partition on it or create a swap file.

To this effect:

  • Connect the disk to the virtual machine or create a swap file:
    dd if=/dev/zero of=/swapfile bs=1M count=1024
    
  • Create a swap partition on the disk:
    mkswap /dev/sdb1
    
    or in the file:
    mkswap /swapfile
    
  • Connect swap partition:
    swapon /dev/sdb1
    
    or swap file:
    swapon /swapfile
    
  • And finally add an entry about the new swap partition to ets/fstab to avoid its manual activation after each reloading:
    /dev/sdb1 none swap sw 0 0
    
    or about the swap file:
    /swapfile none swap sw 0 0
    


Courses developed by Bitrix24