Why the size of swap space is always 4KiB less than size of actual swap device?
Issue
- Why the size of swap space is always 4KiB less than size of actual swap device?
# lvs --units k
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home rhel_dell-per630-5 -wi-ao---- 514908160.00k
root rhel_dell-per630-5 -wi-ao---- 52428800.00k
swp1 rhel_dell-per630-5 -wi-a----- 4194304.00k <<-----
swp2 rhel_dell-per630-5 -wi-a----- 4194304.00k <<-----
# mkswap /dev/mapper/rhel_dell--per630--5-swp1
Setting up swapspace version 1, size = 4194300 KiB <<-----
# mkswap /dev/mapper/rhel_dell--per630--5-swp2
Setting up swapspace version 1, size = 4194300 KiB <<-----
# cat /proc/swaps
Filename Type Size Used Priority
/dev/dm-1 partition 4194300 0 -2 <<-----
/dev/dm-3 partition 4194300 0 -3 <<-----
Environment
- Red Hat Enterprise Linux.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.