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.
You have to swapoff first and use mkswap and then swapon.