These are the steps to increase the swap size in Linux:
===============================================================================
Please follow the steps:
1. Check how much swap space you already have by typing the command “swapon –s”.
2. Now use data dump (dd) command to create the extra swap file. Command dd if=/dev/zero of=/extraswap bs=1M count=512
replace 512 with the number of megabytes you want in your auxiliary swap file.
3. Type the command mkswap /extraswap to make our file swap-consumable for the Linux kernel.
4. Now open /etc/fstab and find a line about swapfile that looks something like:
/dev/vg00/lvol1 swap swap defaults 0 0
5. Now, add one entry in /etc/fstab below ,above shown line. Add /extraswap swap swap defaults 0 0
6. Restart the VM and perform step 1 to see increased swap.
===============================================================================
Hope this will solve your problem.
No comments:
Post a Comment