0

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?

Chris Muench
  • 417
  • 3
  • 9
  • 29

1 Answers1

2

First do sudo /sbin/swapoff /var/swap.1, then run dd and mkswap and swapon as you did before.

HUB
  • 6,322
  • 3
  • 22
  • 22