Perhaps that Zabbix is really talking about swap, perhaps about something else.
cat /proc/swaps
free
free -h
The /proc/swaps lists all the swaps that are in use and how much. The free
gives nices summary.
Overall, if RAM runs out and system has to swap, then adding swap mainly prolongs suffering.
You have two “disks”: sda and sdb. /dev/sda
and /dev/sdb
. The /dev/sda
has partition table and three partitions in it: /dev/sda1
, /dev/sda2
, and /dev/sda3
The names “sda” and “sdb” could switch on every boot; they are not persistent.
Note, how the fstab does not list those. It does list UUID=7640-9D8A
and UUID=7640-9D8A
is the UUID in the filesystem that is within partition /dev/sda1
.
Likewise, a59ebd6a-768d-46f5-ad98-c7b7efe246a0
is the UUID of the filesystem in /dev/sda2
.
The UUID are persistent, because they are in the data within the filesystems.
The swap has UUID too, 2352123d-138e-4789-98ca-488f85a4e7e1
, but that is not used, as the LVM2 unambiguously creates the link “/dev/mapper/almalinux-swap” to it.
If you really want to use the whole second virtual disk as swap, you could initialize the whole block device as swap:
mkswap /dev/sdb
(Make sure that /dev/sdb is the unused disk before you run that.)
After that, the lsblk -f
will show UUID for /dev/sdb.
One can then add entry to the fstab:
UUID=... none swap defaults 0 0
where you put the UUID in ...
After that I would:
swapoff -a
- remove the
/dev/mapper/almalinux-swap none swap defaults 0 0
from fstab
swapon -a
cat /proc/swaps
And the last one should show that only the 16G disk is used as swap.
More interesting is, will the /dev/mapper/almalinux-swap
be back in use after reboot.
Logically, it should not, but some bits of config is copied into initramfs that kernel uses early in the boot.
When new kernel is installed (in update), its initramfs gets what you use at the time.
When system no longer uses the “old swap” after boot, its LV can be removed, with lvremove
. (See man lvremove
)