Q
Q
q2zoff2019-04-11 22:54:41
linux
q2zoff, 2019-04-11 22:54:41

How to reduce SWAP size?

Hello.
There is a server with Debian just installed. The default SWAP size is 64G. It is necessary to reduce it to 4G, and combine the resulting space with a single logical partition. Actually, how can this be done without resorting to reinstalling the OS?
UPD EXT4 file system.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2019-04-11
@Zoominger

sudo swapoff /раздел
This will disable swap (preferably after a reboot when no programs are running).
Then run GParted or Gnome Disks, delete the swap partition and create a new one. Everything is simple, but if you have questions - write. This can be done on a live system.
If you want, you can expand the adjacent partition to the freed space. Some filesystems allow you to do this on the working system.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question