[SOLVED] swapoff - Is it possible to reclaim pve-swap space for pve-root?

thisisbenwoo

New Member
May 28, 2021
14
1
3
50
Hello all,

I run all my nodes with SSDs or NVMe drives. I don't like using swap with these devices. Additionally, most of my nodes are read-only nodes. I've measured that my R/W ratio is >90%/10%. I know that many of you might want to challenge my decision on doing this, and I am happy to debate this in another thread.

But since that's the decision I am taking, what I'd like to understand is if it is possible now that my swap volume (pve-swap) is now 0, to reclaim that space and allocate it to the pve-root volume.

Code:
lsblk gives the following output:
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1                      259:0    0   477G  0 disk
├─nvme0n1p1                  259:1    0  1007K  0 part
├─nvme0n1p2                  259:2    0   512M  0 part /boot/efi
└─nvme0n1p3                  259:3    0 476.4G  0 part
  ├─pve-swap                 253:0    0     8G  0 lvm
  ├─pve-root                 253:1    0    96G  0 lvm  /
  ├─pve-data_tmeta           253:2    0   3.6G  0 lvm
  │ └─pve-data-tpool         253:4    0 349.3G  0 lvm
  │   ├─pve-data             253:5    0 349.3G  0 lvm
  │   ├─pve-vm--100--disk--0 253:6    0     4M  0 lvm
  │   ├─pve-vm--100--disk--1 253:7    0    32G  0 lvm
  │   ├─pve-vm--101--disk--0 253:8    0     4M  0 lvm
  │   └─pve-vm--101--disk--1 253:9    0    48G  0 lvm
  └─pve-data_tdata           253:3    0 349.3G  0 lvm
    └─pve-data-tpool         253:4    0 349.3G  0 lvm
      ├─pve-data             253:5    0 349.3G  0 lvm
      ├─pve-vm--100--disk--0 253:6    0     4M  0 lvm
      ├─pve-vm--100--disk--1 253:7    0    32G  0 lvm
      ├─pve-vm--101--disk--0 253:8    0     4M  0 lvm
      └─pve-vm--101--disk--1 253:9    0    48G  0 lvm

Is it possible to reclaim pve-swap 8G and allocate it to pve-root??
Thanks in advance!
 
  • Like
Reactions: Stoiko Ivanov

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!