Last active
February 13, 2025 21:26
-
-
Save marvin-marvin/a02f9eb1e33ac5b8f2f4987fec626a3b to your computer and use it in GitHub Desktop.
extend swapfile proxmox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change Swapfile: | |
swapoff -v /dev/pve/swap | |
lvm lvresize /dev/pve/swap -L +48G | |
mkswap /dev/pve/swap | |
swapon -va | |
dd if=/dev/zero of=/dev2/swap bs=1M count=49152 | |
mkswap /dev2/swap | |
swapon -v /dev2/swap | |
# Resize the LVM2 logical volume by 256 MB: | |
lvm lvresize /dev/VolGroup00/LogVol01 -L +256M | |
# Format the new swap space: | |
mkswap /dev/VolGroup00/LogVol01 | |
# Enable the extended logical volume: | |
swapon -va | |
# Test that the logical volume has been extended properly: | |
cat /proc/swaps free | |
dd if=/dev/zero of=//dev/swap2 bs=1M count=8192 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks Marvin! I was looking for commands to expand the default swap partition in Proxmox. But when I saw your post - now I'm wondering why make 3 swap partitions?