I created swap file doing this:
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=4096
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1
I would like to increase to 16GB
I tried running this command
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=16384
but got error:
/bin/dd: failed to open ‘/var/swap.1’: Text file busy
How would I increase swap file size?
Best Answer
First do
sudo /sbin/swapoff /var/swap.1
, then rundd
andmkswap
andswapon
as you did before.