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.
Asked
Active
Viewed 223 times
1 Answers
1
You have to swapoff first and use mkswap and then swapon.
- sudo swapoff /dev/nvmelnl
- sudo mkswap /dev/nvmelnl
- sudo swapon /dev/nvmelnl
- sudo swpaon --show

saranjeet singh
- 868
- 6
- 17
-
What if I do not do this? Would it mean that the system would not use 15gb but 3gb instead? – Benny Jul 16 '20 at 14:26
-
1It won't use 15gb. – saranjeet singh Jul 16 '20 at 14:31