Operating System - HP-UX
1751970 Members
4537 Online
108783 Solutions
New Discussion юеВ

Re: secondary swap delete

 
SOLVED
Go to solution
malay boy
Trusted Contributor

secondary swap delete

Hi Guru's,
Need some advice / document on how to delete the secondary swap space . Here are information from swapinfo :

# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1048576 118320 930256 11% 0 - 1 /dev/vg00/lvol2
dev 10240000 0 10240000 0% 0 - 2 /dev/vg00/u0swap
reserve - 290452 -290452
memory 336332 137888 198444 41%

want to delete /dev/vg00/u0swap .

regards
mB
There are three person in my team-Me ,myself and I.
8 REPLIES 8
Patrick Wallek
Honored Contributor
Solution

Re: secondary swap delete

That's an easy 2 step process --

1) Comment out, or delete, the /dev/vg00/u0swap line in /etc/fstab

2) Reboot the machine. Upon reboot that swap area won't be mounted.

Swap can NOT be deleted without rebooting the machine. If this is something you wanted to accomplis without a reboot, then I'm sorry to tell you that you can't do it. A reboot will be required!
Sanjiv Sharma_1
Honored Contributor

Re: secondary swap delete

Hi,

Comment or delete the /dev/vg00/u0swap line in /etc/fstab and reboot the machine.

Reboot is must.
Everything is possible
T G Manikandan
Honored Contributor

Re: secondary swap delete

The swap which you are trying to remove has a priority 2 and will be used after swap with priority 1.

removing swap would require a system reboot.
Michael Tully
Honored Contributor

Re: secondary swap delete

It's not possible to remove/disable swap once it is up. The system requires a reboot.
Edit the /etc/fstab and comment out the line for the swap or remove the line and then reboot your system when ready.
Anyone for a Mutiny ?
Trond Haugen
Honored Contributor

Re: secondary swap delete

Swap can be added on the fly but unfortunately removing it requiers a reboot. All but primary swap is deffined with a line in /etc/fstab. All you have to do is delete or comment out that line and reboot. Or comment it out now and til will be removed at the next maintainance/reboot.
The above is the same for device seap and filesystem swap.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Ralph Grothe
Honored Contributor

Re: secondary swap delete

Hi,

unfortunately all replies regarding swapspace releasing on HP-UX are correct in that to achieve this a reboot is required.

However, I cannot supress to mention that there are indeed other Unices where such is possible without a reboot.

E.g. here's the manpage of the swap command of a Solaris 8 box of ours':


Maintenance Commands swap(1M)



NAME
swap - swap administrative interface

SYNOPSIS
/usr/sbin/swap -a swapname [ swaplow ] [ swaplen ]

/usr/sbin/swap -d swapname [ swaplow ]

/usr/sbin/swap -l

/usr/sbin/swap -s

DESCRIPTION
The swap utility provides a method of adding, deleting, and
monitoring the system swap areas used by the memory manager.

OPTIONS
The following options are supported:


...

-d swapname
Delete the specified swap area. This option can only
be used by the super-user. swapname is the name of the
swap file: for example, /dev/dsk/c0t0d0s1 or a regular
file. swaplow is the offset in 512-byte blocks into
the swap area to be deleted. If swaplow is not speci-
fied, the area will be deleted starting at the second
page. When the command completes, swap blocks can no
longer be allocated from this area and all swap blocks
previously in use in this swap area have been moved to
other swap areas.


N.B. to my knowing Linux as well comes with a swapoff command ;-)

Madness, thy name is system administration
Sreer
Valued Contributor

Re: secondary swap delete

Hello,

 

For removing secondary swap also reboot is must.

 

Remove entry from fstab

 reboot server.Seems that is the only option.

 

Rgds

Sree

Matti_Kurkela
Honored Contributor

Re: secondary swap delete

There is a free optional enhancement package for HP-UX 11.31 that provides the "swapoff" functionality:

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=SwapoffEnh

 

The installation instructions don't mention if the installation of SwapoffEnh requires a reboot or not. However, they say this package depends on kernel patch PHKL_38038: if you don't have that patch installed, installing the kernel patch will definitely require a reboot.

 

MK