View previous topic :: View next topic |
Author |
Message |
HeXiLeD Veteran
Joined: 20 Aug 2005 Posts: 1159 Location: Online
|
Posted: Fri Aug 25, 2006 6:20 pm Post subject: swapoff fails [SOLVED] |
|
|
For some weird reason.. i cant seem to swapoff
fstab
Code: | /dev/sda2 none swap sw 0 0 |
Code: | # swapoff /dev/sda2
swapoff: /dev/sda2: Cannot allocate memory
# swapoff -V /dev/sda2
swapoff: mount-2.12r
# swapoff -V /dev/sda2
swapoff: mount-2.12r
sync ; mkswap /dev/sda2
Setting up swapspace version 1, size = 1998737 kB
no label, UUID=35ebbf2e-be66-48a3-adc0-2e42b5ab5d3a
# swapon /dev/sda2
swapon: /dev/sda2: Device or resource busy
# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda2 partition 1951888 1365836 -1
|
_________________ Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...
CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Last edited by HeXiLeD on Fri Aug 25, 2006 11:20 pm; edited 1 time in total |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Fri Aug 25, 2006 9:22 pm Post subject: |
|
|
What does free report? |
|
Back to top |
|
|
HeXiLeD Veteran
Joined: 20 Aug 2005 Posts: 1159 Location: Online
|
Posted: Fri Aug 25, 2006 11:20 pm Post subject: |
|
|
I found out why swapoff fails; and its because the amount of swap file being used is bigger than what can fit in the my RAM
In other words, when we do swapoff; all that is stored in the swap will be moved to the amount of free RAM available.
If the free RAM available is less than the swap being used, the system cant turn off the swap because it needs to 'dump' it to the RAM
In other words if you have 512 of ram and you only have 100mb of that ram available and your swap is using 300mb, you cant swapoff because the 300mb of the swap wount be able to fit in the free 100mb of the RAM.
To test this i killed most applications that i wasnt using at the time and tried to lower the amount of RAM and SWAP being used at the moment.
Once the i was able to free enough RAM i was able to swapoff it no issues.
This problem is solved. _________________ Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...
CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244 |
|
Back to top |
|
|
|