π ~1 min read
Table of contents
Symptom & Impact
OOM events increase and workload stability declines under memory spikes.
Environment & Reproduction
Common after disk migration or UUID changes to swap partitions/files.
swapon --show
free -h
cat /etc/fstab
Root Cause Analysis
Invalid fstab swap entry, missing swap signature, or SELinux label mismatch on swapfile.
Quick Triage
Confirm swap device visibility and activation errors.
lsblk -f
blkid | grep swap
journalctl -xb | grep -i swap
Step-by-Step Diagnosis
Validate swap signature and fstab mapping.
file -s /dev/vdb2
awk '!/^#/ && /swap/' /etc/fstab
findmnt --verify

Solution – Primary Fix
Recreate swap signature and enable entry persistently.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
mkswap /dev/vdb2
swapon /dev/vdb2
vi /etc/fstab

Solution – Alternative Approaches
Create a dedicated swapfile when partition changes are impractical.
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
Verification & Acceptance Criteria
Swap appears active before and after reboot.
swapon --show
free -h
reboot
Rollback Plan
Disable new swap target and restore previous configuration if performance degrades.
swapoff -a
cp -a /etc/fstab.bak /etc/fstab
swapon -a
Prevention & Hardening
Track fstab and storage UUID changes during infrastructure updates.
blkid
cp -a /etc/fstab /etc/fstab.bak
Related Errors & Cross-Refs
Can coincide with kernel OOM kills and cgroup memory limit pressure.
Related tutorial: View the step-by-step tutorial for rhel-10.
View all rhel-10 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
RHEL memory management and swap provisioning best practices.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.