I’m trying to create a swap file in my Raspberry Pi 3 Model B machine, which runs resionOS.
I followed this guide here Create a swap file (see section Create a swap file).
Each of the commands there goes fine, but at the end it doesn’t look that I have a usable swap file in my machine.
When I try to monitor my swap space, it shows me a total of 0.
Example:
-
> free -m
output:
Swap: 0 0 0
-
> swapon --all
this throws an error:
swapon: /swapfile: swapon failed: Input/output error
-
> top
output:
KiB Swap: 0 total, 0 used, 0 free.
So, as far as I understand it looks like something goes wrong when trying to crate the swap file, but I’m not sure what it is.
What can it be?
Is there any other approach to create a swap file?