Why i cant turn of swap?

when i try to turn it off it says

[root@OpenWrt:11:38 PM ~] # swapoff /dev/sdb1
block: failed to swapoff /dev/sdb1 (-1)
[root@OpenWrt:11:39 PM ~] #

Check return code

swapon -s
swapoff /dev/sdb1
echo $?

One possibility would be if too much swap is already in use.

2 Likes