1833403 Members
2954 Online
110052 Solutions
New Discussion

SWAP

 
SOLVED
Go to solution
JJ_23
Occasional Contributor

SWAP


If you don't mirror swap and you lose the disk - what is the effect ?
6 REPLIES 6
Michael Tully
Honored Contributor

Re: SWAP

I am fairly sure your system won't boot.
Anyone for a Mutiny ?
JJ_23
Occasional Contributor

Re: SWAP

I forgot to add - there would be multiple swap partitions on other disk devices.

I'm assuming only primary swap is necessary to boot?
Patrick Wallek
Honored Contributor

Re: SWAP

Your machine will NOT be able to start any more processes and it could very well crash.

You absolutely MUST mirror your swap.
Michael Tully
Honored Contributor

Re: SWAP

You must have a swap partition in your /dev/vg00 volume group. Your system will not start any processes without this being available, even in single-user mode.
Anyone for a Mutiny ?
Patrick Wallek
Honored Contributor
Solution

Re: SWAP

You must remember how HP-UX works. When a process starts, enough swap space is reserved JUST IN CASE the process needs to be paged out. This is why you must have the equivalent amount of swap space as RAM (or enable the swapmem_on kernel parameter). Now if a swap area has not been mirrored and the disk goes bad, at the minimum you may not be able to start any more processes because there is no longer space to reserve from.

Now if a swap area that has had space reserved goes away then there is the potential that your machine will go belly up depending on how HP-UX reacts to not having that reserved area available any more.

Yes you MUST have some primary swap in order to boot the system. If you other swap space is not in a RAID-5 LUN or is not mirrored you are still not completely protected and could have serious problems down the road.
Bill Hassell
Honored Contributor

Re: SWAP

A bad spot in the primary swap area will crash the system when that swap area is accessed. If you lose the disk, the primary swap area is part of the HP-UX opsystem so you loose everything. If a secondary swap area on another disk goes bad (while running), the system will also crash since the swap area was OK at boot time and swap is equivalent to RAM. If RAM goes away (virtual memory in the case of swap), the system cannot continue.

So there are two scenarios: loss of the disk (the disk does not respond at all) will lose access to everything on the disk (swap and data if applicable), and athen bad spot in the swap area. The bad spot (in swap) will crash the system but only when that area is accessed.


Bill Hassell, sysadmin