Operating System - HP-UX
1834789 Members
2283 Online
110070 Solutions
New Discussion

Re: secondary device swap and bad block relocation

 
Ralph Grothe
Honored Contributor

secondary device swap and bad block relocation

Hi,

simple question,
is it really necessary (or maybe advisable) to create a logical volume meant for secondary device swap to prevent bad block relocation (i.e. lvcreate -r n ...).
I know you have to enable strict and contiguous allocation (i.e. lvcreate -s y -C y ...), but I'm not sure about the BBR (n.b. I don't mean to create a primary swap device with lvlnboot)

Regards

Ralph
Madness, thy name is system administration
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: secondary device swap and bad block relocation

Hi Ralph:

Technical Knowledge Base document #KBRC00010410 notes that bad block relocation should be turned off with 'lvchange -r n' for the boot, root, primary swap, and dump logical volumes. By default this is the case when HP-UX is installed.

Therefore, I would simply turn it off for secondary swap devices too.

Regards!

...JRF...
Sridhar Bhaskarla
Honored Contributor

Re: secondary device swap and bad block relocation

Hi Ralph,

That is a very good question. We do have documented procedures for primary swap but not for secondary swap.

Paging on secondary swap is handled by LVM unlike primary swap during the initial boot process. So, I would say that these restrictions are not mandatory for secondary swaps.

However, I do create my secondary swaps with the recommended options for primary swap.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
S.K. Chan
Honored Contributor

Re: secondary device swap and bad block relocation

The contigous nature of boot,root,pri-swap and dump results in all of these LVs being set to ..
Bad Block = n
from the "lvdisplay" output. That's obvious because you cannot be moving/relocating blocks in a contigous logical volume.
Now as the case for 2ndary swap since any device swap must be contigous (with lvcreate -s y -C y) then it also must have it's bad block turn off (ie -r n). That's what I've been taught.
Michael Tully
Honored Contributor

Re: secondary device swap and bad block relocation

If you using an external disk array such as an EMC symmetrix, you may need to set the bad block re-location to 'NONE'. This is the recommendation from EMC.
Suggest you check with external disk array supplier if your still not sure. Because of the way these newer disk arrays work, the old methods or 'lvcreate -r n' may not be relevant, even when utilising secondary swap.
Anyone for a Mutiny ?
Ralph Grothe
Honored Contributor

Re: secondary device swap and bad block relocation

Hello responders,

many thanks for your attempts to clarify things for me.

Unfortunately, I can only allocate disk space from the mirrored internal disks of the Root VG for additional swap space purposes, which performance-wise isn't the best choice.
The disk space in our storage systems (e.g. EMC, Comparex) is sparse and valuable, so that I cannot "waste" it on swap.
The application which is meant to run on this box (i.e. SAP R/3) requires (this seems mandotory by SAP "recommendatios") for our database server, and the phys. RAM available, 20 GB swap.
Thus I had to supply the application with another 12 GB.
When creating the LV I supplied only the flags "-L 12000 -s y -C y -m 1", thus lvdisplay showed me this:


# lvdisplay /dev/vg00/lvol12
--- Logical volumes ---
LV Name /dev/vg00/lvol12
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 12000
Current LE 1500
Allocated PE 3000
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict/contiguous
IO Timeout (Seconds) default


Concluding from your suggestions I now changed the relocation policy by

# lvchange -r n /dev/vg00/lvol12

Now I can somewhat reassured add a swap device entry in /etc/fstab and activate it by "swapon -a"
Btw, what priority value (i.e. pri=) would you recommend as an fstab option?
As said, I didn't have the luxury of spreading swap over several spindles.

Thanks

Ralph
Madness, thy name is system administration
Stefan Farrelly
Honored Contributor

Re: secondary device swap and bad block relocation


I recommend swap priority should all be set to 1 (for all swap areas). I note on a fresh 11i install the installer did this by default.
Im from Palmerston North, New Zealand, but somehow ended up in London...