expand the SWAP memory in PROXMOX

(For me) relying on swap on a PVE host is a really bad idea. Real RAM ist always the most scarce resource...

You might want to search for "zram" to get some percent more headroom...

BTW: you did not tell us anything about your system. How would you expect any helpful hint specific for your situation???
 
  • Like
Reactions: Johannes S and tirk
another question I have is, I have PROXMOX8.2.7 installed on a 480GB SSD with the /dev/sda3 LVM partition is 319GB, how can I resize the partition instead of 319 being 479GB? thank you so much
 
another question I have is, I have PROXMOX8.2.7 installed on a 480GB SSD with the /dev/sda3 LVM partition is 319GB, how can I resize the partition instead of 319 being 479GB? thank you so much
It's LVM so it does not matter. Just create a volume of the size you want.
 
No, you already have your physical volume and your volume group. You just need to create a new volume as described in the link I gave you or resize the one you already have, where your current swap is located.

As you said, you have currently 16 GB or RAM and also 16 GB of swap and it is not enough. I don't see the point in getting even more swap as others also pointed out.
 
No, you already have your physical volume and your volume group. You just need to create a new volume as described in the link I gave you or resize the one you already have, where your current swap is located.

As you said, you have currently 16 GB or RAM and also 16 GB of swap and it is not enough. I don't see the point in getting even more swap as others also pointed out.
I would like to change the size of current exchange and I don't know how to do it
without information being lost
 
Last edited:
root@PROMOX:~# pvresize /dev/sda3
Physical volume "/dev/sda3" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
---------------------------------------------------------------------------------------------------------------
root@PROMOX:~# lvdisplay
--- Logical volume ---
LV Name data
VG Name pve
LV UUID SkBLSE-8FXF-Vjyb-BPjv-91IK-RW25-CoIUVO
LV Write Access read/write (activated read only)
LV Creation host, time proxmox, 2024-06-08 09:46:36 +0200
LV Pool metadata data_tmeta
LV Pool data data_tdata
LV Status available
# open 0
LV Size <185.60 GiB
Allocated pool data 78.67%
Allocated metadata 4.36%
Current LE 47513
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:5

--- Logical volume ---
LV Path /dev/pve/swap
LV Name swap
VG Name pve
LV UUID l0dIpM-KsUK-52q4-dxse-etW1-WVgr-Zo7RRe
LV Write Access read/write
LV Creation host, time proxmox, 2024-06-08 09:45:58 +0200
LV Status available
# open 2
LV Size <7.25 GiB
Current LE 1855
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0

--- Logical volume ---
LV Path /dev/pve/root
LV Name root
VG Name pve
LV UUID u9JSm4-MoVq-14GC-3hIq-7jXw-g1fn-sOLCLE
LV Write Access read/write
LV Creation host, time proxmox, 2024-06-08 09:45:58 +0200
LV Status available
# open 1
LV Size 100.46 GiB
Current LE 25718
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1

--- Logical volume ---
LV Path /dev/pve/vm-101-disk-0
LV Name vm-101-disk-0
VG Name pve
LV UUID yGLanz-jWc0-sMfk-CKWH-yJCN-4Z7Q-nHjBQ1
LV Write Access read/write
LV Creation host, time PROMOX, 2024-06-08 12:37:54 +0200
LV Pool name data
LV Status available
# open 0
LV Size 4.00 MiB
Mapped size 100.00%
Current LE 1
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:6

--- Logical volume ---
LV Path /dev/pve/vm-101-disk-1
LV Name vm-101-disk-1
VG Name pve
LV UUID mffqT7-rU7p-2TU5-dvoy-VTJn-5lVi-fN6iZ7
LV Write Access read/write
LV Creation host, time PROMOX, 2024-06-08 12:38:00 +0200
LV Pool name data
LV Status available
# open 0
LV Size 32.00 GiB
Mapped size 100.00%
Current LE 8192
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:7

--- Logical volume ---
LV Path /dev/pve/vm-109-disk-0
LV Name vm-109-disk-0
VG Name pve
LV UUID i12Qmf-dYus-RasV-8CP0-IoGD-Lzp8-xOZh83
LV Write Access read/write
LV Creation host, time PROMOX, 2024-07-16 12:52:08 +0200
LV Pool name data
LV Status available
# open 0
LV Size 20.00 GiB
Mapped size 100.00%
Current LE 5120
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:8

--- Logical volume ---
LV Path /dev/pve/vm-108-disk-0
LV Name vm-108-disk-0
VG Name pve
LV UUID gt0IGP-c6HF-Mwqo-QsIx-f0UB-20qR-7VDZCx
LV Write Access read/write
LV Creation host, time PROMOX, 2024-08-25 08:54:34 +0200
LV Pool name data
LV Status available
# open 1
LV Size 32.00 GiB
Mapped size 100.00%
Current LE 8192
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:9

--- Logical volume ---
LV Path /dev/pve/vm-114-disk-0
LV Name vm-114-disk-0
VG Name pve
LV UUID MQaNf3-JOmT-WJQ6-v1gW-B60c-PnfX-J45aeG
LV Write Access read/write
LV Creation host, time PROMOX, 2024-09-09 21:20:24 +0200
LV Pool name data
LV Status available
# open 0
LV Size 32.00 GiB
Mapped size 100.00%
Current LE 8192
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:10

--- Logical volume ---
LV Path /dev/pve/vm-116-disk-0
LV Name vm-116-disk-0
VG Name pve
LV UUID CWHP5B-D5au-q4XZ-YJBM-4ikK-8uyo-oeEfOg
LV Write Access read/write
LV Creation host, time PROMOX, 2024-09-09 21:55:50 +0200
LV Pool name data
LV Status available
# open 1
LV Size 20.00 GiB
Mapped size 100.00%
Current LE 5120
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:11

--- Logical volume ---
LV Path /dev/pve/vm-117-disk-0
LV Name vm-117-disk-0
VG Name pve
LV UUID BQ1v7E-Cm6q-Y4B5-uCLQ-hIlV-ibmp-OY35Jq
LV Write Access read/write
LV Creation host, time PROMOX, 2024-09-11 15:53:22 +0200
LV Pool name data
LV Status available
# open 0
LV Size 10.00 GiB
Mapped size 100.00%
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:12
------------------------------------------------------------------------------------------------------
lvresize --extenes .100%FREE --resizefs /dev/-volume group name-/root ????????? I don't understand how to do it.
 
As already said, you already have a swap device in pve/swap with 7.25 GB ... fix your problems concerning the memory load and do not increase swap.
 
Strange, is this is really about repartition / extending anything? If the OP just wants more swap, why not add extra, even as a file?
 
  • Like
Reactions: waltar
I just need to know how to make an LVM partition or resize the one I have to accommodate the free 160GB I need to know how he creates
 
Last edited:
I just need to know how to make an LVM partition or resize the one I have to accommodate the free 160GB I need to know how he creates
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.
 

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!