1748153 Members
3690 Online
108758 Solutions
New Discussion юеВ

Deallocating swap spaces

 
SOLVED
Go to solution
panks
Regular Advisor

Deallocating swap spaces

Hi,

My server is having EVA5K attached to it and now storage guys are taking off that storage and will assign new storage to my server. I unmounted all the logical volume I have created from this storage but when I found that swap space is also allocated from this storage though of discussing with you guys.

Here is the output:
root@abc:/> swapinfo -a
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8388608 67112 8321496 1% 0 - 1 /dev/vg00/lvol2
dev 41943040 67304 41875736 0% 0 - 1 /dev/vg05/swap
reserve - 656692 -656692
memory 49937648 11309812 38627836 23%

I have 2 swap spaces one is from local disk that is vg00 and the other one which I want to take off is from vg05.

This server is not in use and downtime is going on. Can you please suggest me the procedure to take off this swap space also I want to know if this swap space is having mirror volume how can check that.

Thanks
7 REPLIES 7
sujit kumar singh
Honored Contributor
Solution

Re: Deallocating swap spaces

Hi


you can do a

#lvdisplay -v /dev/vg05/swap

to see if that has any mirror copies.

#uncomment the /etc/fstab entry for that VG that is activating this swap:

the entry might look like this

/dev/vg05/swap ... swap pri=X 0 1

please uncomment that entry.

reboot the server and the space /dev/vg05/swap will not be activated as swap.

Regards
Sujit
Robert-Jan Goossens_1
Honored Contributor

Re: Deallocating swap spaces

Hi Panks,

Create a new logical volume on you new san and use that volume to replace the old swap filesystem.

The /etc/fstab holds the entry for both sap files, you just need to change the entry (/dev/vg05/swap) to your new swap lvol and reboot.

Regards,
Robert-Jan
panks
Regular Advisor

Re: Deallocating swap spaces

Thanks guys but I can't assign new storage unless we deallocate this old storage as new stoarge is emc and we have to take this eva off first and then assign new one. So is it ok to comment the entry as of now and then once they assign new storage create new swap space.
Johnson Punniyalingam
Honored Contributor

Re: Deallocating swap spaces

>>. So is it ok to comment the entry as of now and then once they assign new storage create new swap space.<<<

Hi Panks,

Its ok to comment the swap entry . considering your server "doesn't panic or rebooted accidently" Once the Server reboot or startup it will look for "entry" for swap in the "/etc/fstab" and than will complient.

so choice is yours, ..:)
(For Me, Will perform this activiyt once have moved EVA to EMC)

Hope this Helps

Thanks,
Johnson

Problems are common to all, but attitude makes the difference
panks
Regular Advisor

Re: Deallocating swap spaces

OK
panks
Regular Advisor

Re: Deallocating swap spaces

Hello as per your suggestion I have commented entry for the swap space. Now I have assigned new storage, so what is the procedure to create swap space. Do I need to create normal logical volume and then add swap on that. Please suggest
sujit kumar singh
Honored Contributor

Re: Deallocating swap spaces

Hi

for thsi you can create an LV with the Contiguous Policy that is lvcreate with -C y option and also with the Strict policy -s y.

Then after the creation of such an LV which we intend to use as swap,

you can do this two ways.

1)using SAM/SMH -- Disks and Filesys Management -- Swap Space Managemet -- and add new swap space to the system -- on all reboots -- this shall also add an entry to the /etc/fstab.

2)other way is once you have created the Swap LV using lvcreate -L -C y -s y /dev/ options:\
a)
add an entry to the /etc/fstab like this
/dev/vgXX/lvolY ... swap pri=1 0 0

then do

#swapon -a


BY the Way you can reopen this thread to continue further.

Regards
Sujit