Hi,
Recently I upgraded my memory so I would like to also increase the swap size.
My earlier setting is that I have two swap partitions. Both swap partitions are the second of the three partitions on the NVME devices. They were both 10G so the total swap size was 20G at that time.
Now I would like to increase the swap size to a total 72G. Because there was no spared space on the devices, so I deleted the original swap (second) and third partitions on both devices, and then recreate the two swap partitions to 32G on each and the rest of the space to the third partition on both devices (for mirror purpose). However, after mounting those two swap partitions, the reported swap size is still 20G.
Below is the output of lsblk
and swapon --show
. You can see the size is different.
lsblk ✔
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 465.8G 0 part
└─sda9 8:9 0 8M 0 part
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 1.8T 0 part
└─sdb9 8:25 0 8M 0 part
sr0 11:0 1 1024M 0 rom
nvme1n1 259:0 0 931.5G 0 disk
├─nvme1n1p1 259:1 0 514M 0 part
│ └─md127 9:127 0 513.9M 0 raid1
│ └─md127p1 259:8 0 512.9M 0 part /boot
├─nvme1n1p2 259:2 0 36G 0 part [SWAP]
└─nvme1n1p3 259:3 0 895G 0 part
nvme0n1 259:4 0 931.5G 0 disk
├─nvme0n1p1 259:5 0 514M 0 part
│ └─md127 9:127 0 513.9M 0 raid1
│ └─md127p1 259:8 0 512.9M 0 part /boot
├─nvme0n1p2 259:6 0 36G 0 part [SWAP]
└─nvme0n1p3 259:7 0 895G 0 part
swapon --show ✔
NAME TYPE SIZE USED PRIO
/dev/nvme0n1p2 partition 10G 0B -2
/dev/nvme1n1p2 partition 10G 0B -3
I used the fstab to mount the swap partitions:
cat /etc/fstab ✔
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
UUID=1A66-24E1 /boot vfat defaults 0 0
UUID=5af3f596-1068-457f-9d64-4db5aa649caa none swap defaults 0 0
UUID=388de0df-1d0b-4f78-b6a7-2888859d3fa1 none swap defaults 0 0
Please let me know how to solve this issue.
Cheers.