How to limit swap usage without using sysctl or resizing the partition?
0
votes
0
answers
111
views
There is the following scenario: I have an HDD disk that uses LVM and I cannot resize the partitions in it, in this disk, there is a swap partition that is 10gb. I also use zram apart from disk based swap, so I cannot tweak sysctl parameters because I am using these values to make zram work well. Also, the swap disk has -1 priority while the zram is top priority, nevertheless, the swap disk usage is way higher than it should be, so I thought resizing it to 1gb would avoid this.
The only option that I thought about was setting up fstab to pretend the swap is smaller than it is, but as I researched, could not found a way to configure it.
The information about the disk is the following:
┌──(root💀debian)-[~skid]
└─# pvdisplay -m
--- Physical volume ---
PV Name /dev/mapper/sda3_crypt
VG Name debian-vg
PV Size <930.52 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 238212
Free PE 0
Allocated PE 238212
PV UUID 3SCpEr-CHMe-96gN-mN9y-goNs-3ZOj-Mk4JcD
--- Physical Segments ---
Physical extent 0 to 2383:
Logical volume /dev/debian-vg/swap
Logical extents 0 to 2383
Physical extent 2384 to 238211:
Logical volume /dev/debian-vg/root
Logical extents 0 to 235827
Asked by Overclocked Skid
(126 rep)
May 26, 2022, 11:52 PM
Last activity: May 27, 2022, 09:36 PM
Last activity: May 27, 2022, 09:36 PM