1834814 Members
2937 Online
110070 Solutions
New Discussion

decrease swap size

 
SOLVED
Go to solution
Tina Waitherwerch
Occasional Advisor

decrease swap size

I reread the rules for setting up swap. I have 2 swap areas on 2 diff physical disks, but the 2 are not of similar size. I would like to decrease the size of one swap and create another swap of equal value on another physical disk. The swap I want to decrease is type device swap. I removing the LV and and creating a new LV swap the only way?

Also, does it hurt to have bad block relocation set on LV swap if this option is ignored?
5 REPLIES 5
Martin Johnson
Honored Contributor
Solution

Re: decrease swap size

You have to reboot the system to remove swap. Delete or comment out any references to the swap area you want to remove in /etc/fstab, then reboot.

After the reboot you can delete the LV and recreate it in the size you want.

HTH
MArty
Deshpande Prashant
Honored Contributor

Re: decrease swap size

Hi
Removing swap will need rebooting the system.
Just coment out the swap entry in /etc/fstab file and reboot the machine.
Then you can delete the swap lvol. Addition of new swap can be done online.

Thanks.
Prashant.
Take it as it comes.
steven Burgess_2
Honored Contributor

Re: decrease swap size

Hi

With HPUX you have to reboot the system to get rid of the swap space. reduce the lv then remount

HTH

Steve
take your time and think things through
Sandip Ghosh
Honored Contributor

Re: decrease swap size

By the way, there is no necessity to make the swap of same size, but there is a necessity to have the swap of the same priority.

Sandip
Good Luck!!!
Sean OB_1
Honored Contributor

Re: decrease swap size

To decrease the size of swap you'll need to comment or remove the entry from /etc/fstab.

Then reboot the system.

After that you can lvremove the volume and recreate it with the size that you want.

HTH

Sean