I have a VPS that runs cPanel. Currently it has a physical swap patition and isn't big enough for the sites I'm running. I wondering how difficult it would be to remove the partition and then create a swap file with cPanel's script instead.
Code: Select all
[root@connected lib]# fdisk -l
Disk /dev/xvda: 128.8 GB, 128849018880 bytes, 251658240 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000ae971
Device Boot Start End Blocks Id System
/dev/xvda1 * 2048 249563135 124780544 83 Linux
/dev/xvda2 249563136 251658239 1047552 82 Linux swap / Solaris
Disk /dev/loop0: 4294 MB, 4294967296 bytes, 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@connected lib]# free -m
total used free shared buff/cache available
Mem: 4777 1059 2752 12 965 3427
Swap: 1022 655 367
[root@connected lib]#
Code: Select all
[root@connected lib]# cat /proc/swaps
Filename Type Size Used Priority
/dev/xvda2 partition 1047548 670060 -1
[root@connected lib]#