1834552 Members
3493 Online
110069 Solutions
New Discussion

Re: Removing 2nd swap

 
Stanimir
Trusted Contributor

Removing 2nd swap

Please help me to remove 2nd swap-device from my system: hpux 10.20
I have created it by commands:
#newfs -F vxfs -R 200 /dev/vgs/rlvs
#swapon -e /dev/vgs/lvs
Then I have received by swapinfo the following:
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1126400 0 1126400 0% 0 - 1 /dev/vg00/lvol2
dev 102400 0 102400 0% 1978368 - 1 /dev/vgs/lvs
reserve - 330244 -330244
memory 805408 235956 569452 29%
Can I remove 2nd swap on /dev/vgs/lvs without reboot the system?
If not, how I can proceed after reboot to remove it from the system, keeping the primary swap: /dev/vg00/lvol2 ?
Regards,S.
4 REPLIES 4
Christopher Caldwell
Honored Contributor

Re: Removing 2nd swap

>Can I remove 2nd swap on /dev/vgs/lvs without reboot the system?
No.

>If not, how I can proceed after reboot to remove it from the system, keeping the primary swap: /dev/vg00/lvol2 ?

swap is required on the boot drive. For secondary swap, comment out the secondary swap entry in /etc/fstab, reboot. The secondary swap is gone. Reclaim the lvol now.
Patrick Wallek
Honored Contributor

Re: Removing 2nd swap

As far as I know you have to reboot to remove swap.

The easiest thing to do is to edit your /etc/fstab file and remove the line that looks some like

/dev/vgs/lvs ... swap

After you reboot it will not be used for swap anymore. You can then remove the LV and VG is you desire with the lvremove and vgremove commands. Or if this LV is the only one in that VG you could vgexport the VG to remove it.
James R. Ferguson
Acclaimed Contributor

Re: Removing 2nd swap

Hi:

To remove your secodary swap space, delete its entry from '/etc/fstab' and reboot. Once activated a swap space cannot be deactivated. Hence a reboot must intervene so that it is not activiated and thus can be removed.

Regards!

...JRF...
MANOJ SRIVASTAVA
Honored Contributor

Re: Removing 2nd swap

No you cant remove the second swap w/o rebooting the system , all you can do is to remove it from /etc/fstab adn then reboot the system.


Manoj Srivastava