LVM and VxVM

HPUX 11.23 LVM and NO Bad Block Relocation

 
SOLVED
Go to solution
mark vosberg
Advisor

HPUX 11.23 LVM and NO Bad Block Relocation

I am trying to mirror a Logical Volume to a disk which already has several LV's on it. Unfortunately this disk has developed a bad sector on it so I get 2 stale extents when I mirror. In the past BBR took care of this but 11.23 has dropped BBR(-r flag in lvcreate). Does anyone know of a way to update a disks bad block directory in 11.23 so that lvm will skip this bad sector?
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor
Solution

Re: HPUX 11.23 LVM and NO Bad Block Relocation

Hi Mark:

If you want to 'vgexport' the affected volume to a release prior to 11.23 you could relocate the bad block. Otherwise, the switch is ignored as of 11.23:

http://docs.hp.com/en/B3921-60631/lvcreate.1M.html

Regards!

...JRF...
Torsten.
Acclaimed Contributor

Re: HPUX 11.23 LVM and NO Bad Block Relocation

This is from the 11.31 documentation, but it applies to 11.23 too:

"NOTE: At one time, LVM performed bad block relocation in software, but now defers to the hardware bad block relocation implemented within modern disks and disk arrays. LVM recognizes and honors software relocation entries created by previous releases but will not create new ones. Enabling or disabling bad block relocation using lvchange has no effect."

http://docs.hp.com/en/5991-6481/ch04s04.html


Bad luck, if you have stale extends on your source disk. This is the reason why you should mirror disks anyway.

If a disk cannot write to the surface, it will write anywhere else and mark this area bad, but if it cannot read it is just bad.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
mark vosberg
Advisor

Re: HPUX 11.23 LVM and NO Bad Block Relocation

Thanks for the replys. Here is what I did to get lvm to bypass the bad sector.

Original error when mirroring LV.
(#)root> lvextend -m 1 /dev/vg02/ep_upg /dev/dsk/c6t6d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
lvextend: Couldn't re-synchronize stale partitions of the logical volume:
I/O error
lvextend: Couldn't resynchronize logical volume "/dev/vg02/ep_upg".

So I thought the disk I was mirroring to was the problem.
root> lvdisplay -v /dev/vg02/ep_upg | grep stale
LV Status available/stale
00344 /dev/dsk/c4t6d0 00344 current /dev/dsk/c6t6d0 00344 stale
00346 /dev/dsk/c4t6d0 00346 current /dev/dsk/c6t6d0 00346 stale

SO I removed the mirror and created a huge LV on c6t6d0. It had no problems. So the problem is actually on the primary disk c4t6d0.

I tried copying ep_upg filesystem off but I got IO errors which verified primary disk c4t6d0 was bad. So I just removed ep_upg and recreated it. Then restored it from backup. That fixed it. By recreating the LV then LVM was able to detect the bad sector on c4t6d0 and put it in the bad block dictionary. What a hassle compared to having BBR.
Torsten.
Acclaimed Contributor

Re: HPUX 11.23 LVM and NO Bad Block Relocation

This is IMHO what happens:

During the mirroring the system could not read a block from the primary disk.

The you restored your backup, this means you again *wrote* to the disk - if the bad block was hit during the write the disk it self was relocating (sparing).

I think even the BBR was doing exactly the same and it could not workaround this problem.

See also this:

http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=c01182099&jumpid=reg_R1002_USEN


All of this is not limited to HP-UX and LVM, as you can see here:

http://support.microsoft.com/kb/325615/en-us

(in fact they suggest to low level format the disk to identify bad blocks)


Finally I think if there are blocks that became bad this is always not a good sign and probably indicate a "dying" disk.

First step I would do is test the disk with "dd".

HP diagnostics have a *password restricted* tool to identify bad blocks - ask HP for support if needed.

http://docs.hp.com/en/diag/stm/help/expert/scsi_diskm.htm

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
mark vosberg
Advisor

Re: HPUX 11.23 LVM and NO Bad Block Relocation

Thanks for those follow up articles. Thanks everyone for the information.