Swap file creation broken?

I try to create a swap file on my odroid and my pi 3.
I do dietpi-drive_manager → selecting the drive → create swap → 1 → enter (or tab enter) → magic things happening. After that there is no X in the “[]”. When I navigate again in the create swap menu the value is again 0. This happens everytime.
Is this normal?

if you are connected via SSH, you should be able to scroll up a little bit. There you should see some information above the blue text box. Could you share that information pls.

sudo dietpi-drive_manager
[sudo] password for nick: 
[ INFO ] DietPi-Drive_Manager | Detecting drives, please wait...
[ INFO ] DietPi-Drive_Manager |  - Detected mounted physical drive: /dev/mmcblk1p1 > /
[ INFO ] DietPi-Drive_Manager |  - Detected mounted network drive: > /mnt/nas
[ INFO ] DietPi-Drive_Manager |  - Detected mounted physical drive: /dev/sda2 > /mnt/0CB818880CB81888
[ INFO ] DietPi-Drive_Manager |  - Detected unmounted drive: /dev/sda1
[  OK  ] DietPi-Drive_Manager | mv .fstab /etc/fstab
[  OK  ] DietPi-Drive_Manager | systemctl daemon-reload
[ INFO ] DietPi-Drive_Manager | Checking for required APT packages: e2fsprogs ntfs-3g
[  OK  ] DietPi-Drive_Manager | sync
[ SUB1 ] DietPi-Services > stop 
[  OK  ] DietPi-Services | stop : cron
[  OK  ] DietPi-Services | stop : docker
[  OK  ] DietPi-Services | stop : noip2
[ SUB1 ] DietPi-Set_swapfile > Applying 1 /var/swap
[ INFO ] DietPi-Set_swapfile | Disabling and deleting all existing swap files
[  OK  ] DietPi-Set_swapfile | swapoff -a
[  OK  ] DietPi-Set_swapfile | Desired setting in /boot/dietpi.txt was already set: AUTO_SETUP_SWAPFILE_SIZE=0
[  OK  ] DietPi-Set_swapfile | Desired setting in /boot/dietpi.txt was already set: AUTO_SETUP_SWAPFILE_LOCATION=/var/swap
[ INFO ] DietPi-Set_swapfile | Setting /tmp tmpfs size: 1891 MiB
[  OK  ] DietPi-Set_swapfile | mount -o remount /tmp

where do you like to store the SWAP file on? On which file system? Can you share following pls

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
sda               931.5G  0 disk                                                 
│    vfat   ESD-USB
│                    32G  0 part            3571e14c-01                          90D9-1ECC
     ntfs   Daten 899.5G  0 part /mnt/0CB81 3571e14c-02                          0CB818880CB81888
│                  29.1G  0 disk                                                 
     ext4          29.1G  0 part /          096cb72a-01                          9ff8c837-9bfd-4325-a808-88d6a5ffd817
                      4M  1 disk                                                 
                      4M  1 disk

I tried to store it on mmcblk1 it’s a emmc module.
For the odroid n2+…
Do you want the same information of my pi?

If you try to create the swap space on the drive manager, you will be ask on the size. What value did you specify there? How much physical memory you have?

I have the 4GB Odroid n2+ model.
I want the auto mode.
So I Type „1“ into the field.

In case of 4GB physical memory, no SWAP file is created using the automatic option 1. We create SWAP files for system having less than 2 GB memory only. If you require a SWAP file anyhow, you need to specify the size manually :slight_smile:

Background is that for most installations 2 GiB memory are sufficient, so the auto mode is only to assure that users don’t run into dietpi-software installation errors and all services start up. For more intense usage we cannot reasonably predict how large the swap file needs to be.

Good to know, thank you.