0

I was wondering about something, I used AWS to resize a swap partition on an EC2 instance. When I ssh into the instance and use the command swapon --show in the console I still get the old GB value of the partition, however, if I use lsblk for example, the correct GB value is shown. Is that a bug? Which one of these can I trust now? I want to be certain that the swap space is also properly assigned and used.

enter image description here

Benny
  • 839
  • 16
  • 32

1 Answers1

1

You have to swapoff first and use mkswap and then swapon.

  1. sudo swapoff /dev/nvmelnl
  2. sudo mkswap /dev/nvmelnl
  3. sudo swapon /dev/nvmelnl
  4. sudo swpaon --show
saranjeet singh
  • 868
  • 6
  • 17