Cannot change size swap file

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
KeesBl
Posts: 1
Joined: Mon Aug 17, 2020 1:11 pm

Cannot change size swap file

Post by KeesBl »

I’ve installed DietPi without UI on a 4 Gb micro sd. It runs on a PI model B. I want to decrease the size of the swap file. This is what I do:
log in as root
dietpi-drive_manager
select / and press <enter>
I go to the option: Swap file : [X] |1822 Mib used. Select to change size.
I press <enter> and I get:
Failed: Insufficient free space /, a minimum of 2 Gb is required (527 Mib is available).
The only thing I can do is press <enter>. Then I am back in the previous menu. Type a number ore using the space bar doesn’t help.
What to do?
User avatar
Joulinar
Posts: 2277
Joined: Sat Nov 16, 2019 12:49 am

Re: Cannot change size swap file

Post by Joulinar »

Hi,

many thank's for your request. Short question. What do you like to archive? Do you like to change size or disable SWAP?

you could try following

Code: Select all

/boot/dietpi/func/dietpi-set_swapfile 512 # Sets swap size to 512 MiB
/boot/dietpi/func/dietpi-set_swapfile 0 # Removes the swap file completely
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply