1845947 Members
3870 Online
110250 Solutions
New Discussion

adding swap error

 
SOLVED
Go to solution
Mohan Nathan
Occasional Advisor

adding swap error

I added a new swap area to my server but got the following error when I ran swapon -a;

enabling device paging on /dev/vg00/lvol10.
swapon: /dev/vg00/lvol10 is already enabled for paging.
Enabling device paging on /dev/vg00/lvol9.
swapon: Device /dev/vg00/lvol9 contains a file system.
The system will page in the space after the end of the file system.
Add `end' to the options field in /etc/fstab to turn off this warning.

What happened and how do I fix ?
2 REPLIES 2
Stefan Farrelly
Honored Contributor
Solution

Re: adding swap error


At some point youve used lvol10 as a filesystem and then lvremoved it, so when you now try to add it as swap swapon detects an LVM header on lvol10. What you need to do is 'blast' or remove the header. Do a simple dd;
dd if=/stand/vmunix of=/dev/vg00/rlvol10 bs=1024k

This will then output;
I/O Error
13+1 blocks in
13+1 blocks out

Now if youve already added the swap area to /etc/fstab just reboot and when the server comes up and swapon runs it will not see the LVM header and now add the whole lvol in as swap.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Balaji N
Honored Contributor

Re: adding swap error

try swapon -f /dev/vg00/lvol9 once and then try rebooting the machine.

-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.