expand the SWAP memory in PROXMOX

Why do you want to resize it? If you don't want more swap, what do you want? You can just create VMs on the LVM, and PLEASE read the links we gave you. Everything is in there.
PROMOX had it on a 320GB disk then I cloned the disk on a 480 SSD and now I have 160 GB without format.
I'll try to see if I can since I don't have much experience in Linux, THANKS FOR ALL THE HELP RECEIVED
 
Last edited:
This is what worked just fine for me as my local data volume is not something I use..


root@rainbow:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 pve lvm2 a-- 237.47g <16.00g

root@rainbow:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-a-tz-- 141.22g 0.00 1.13
root pve -wi-ao---- 69.37g
swap pve -wi-ao---- 8.00g

root@rainbow:~# cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0

root@rainbow:~# lvcreate -n swap2 -V 32G pve/data
Logical volume "swap2" created.

root@rainbow:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-aotz-- 141.22g 0.00 1.13
root pve -wi-ao---- 69.37g
swap pve -wi-ao---- 8.00g
swap2 pve Vwi-a-tz-- 32.00g data 0.00

root@rainbow:~# vi /etc/fstab

root@rainbow:~# cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
/dev/pve/swap none swap sw 0 0
/dev/pve/swap2 none swap sw 0 0
proc /proc proc defaults 0 0

root@rainbow:~# /sbin/mkswap /dev/pve/swap2
Setting up swapspace version 1, size = 32 GiB (34359734272 bytes)
no label, UUID=c3a4104a-bb12-4cee-8326-24ce8c9615bb

root@rainbow:~# swapon -a /dev/pve/swap2
swapon: /dev/mapper/pve-swap2: swapon failed: Device or resource busy

root@rainbow:~# swapon
NAME TYPE SIZE USED PRIO
/dev/dm-0 partition 8G 7G -2
/dev/dm-6 partition 32G 0B -3
root@rainbow:~#
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!