Cyberpanel.swap error on XFS filesystems — CyberPanel - WebHosting Control Panel for OpenLiteSpeed

Cyberpanel.swap error on XFS filesystems


Centos 7
Filesystem XFS
(this is the default for Upcloud VPS servers)

The script uses 'fallocate' to create a new swapfile.
This does not work with XFS filesystems as described here:

After running the installation script, the swap files seems to be created, but the command 'swapon cyberpanel.swap' fails with error 'swapon failed: Invalid argument'.

So it is adviced to use 'dd' instead of 'fallocate' which works for all filesystems:

dd if=/dev/zero of=/cyberpanel.swap bs=1024 count=2097152

Another minor thing:
echo "${SWAP_FILE} swap swap sw 0 0" | sudo tee -a /etc/fstab

It is recommended to use:
echo "${SWAP_FILE} none swap sw 0 0" | sudo tee -a /etc/fstab

Although it doesn't matter, just a cosmetic thing :)
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!