Operating System - HP-UX
1748181 Members
3946 Online
108759 Solutions
New Discussion юеВ

which is the best approach to replace a failed disk configured in lv-mirrored VG?

 
SOLVED
Go to solution
stephen peng
Valued Contributor

which is the best approach to replace a failed disk configured in lv-mirrored VG?

dear all,
I often get disk failed in a VG, like vg00, and it belongs to mirrored lv, so how to replace this failed disk most efficently? usually I first use lvreduce -m 0 to de-mirror all the lvs, but when the disk was failed, it caused i/o issue and it would take so long to lvreduce, though at last, it works, and then I use vgreduce to remove the failed disk from VG's configuration. I assume it is not the best way to reach, but I could not figure out others more efficent.
could any one offer me some hints?

Thanks a lot!
11 REPLIES 11
cnb
Honored Contributor

Re: which is the best approach to replace a failed disk configured in lv-mirrored VG?

Pete Randall
Outstanding Contributor

Re: which is the best approach to replace a failed disk configured in lv-mirrored VG?

Your question should be covered in this valuable document from HP:

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad_WP.pdf


Pete

Pete
HCL Ash
Frequent Advisor

Re: which is the best approach to replace a failed disk configured in lv-mirrored VG?

hi..

if your hw is of PA risk

do the following this.

1) vgcfgrestore -n /dev/vg00 /dev/rdsk/cxtydz
2) vgchange -a y vg00
3) mkboot /dev/rdsk/cxtydz
4) mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/cxtydz

5) vgsync vg00

6) lvlnboot -Rv

7) Shutdown -ry 00
Torsten.
Acclaimed Contributor

Re: which is the best approach to replace a failed disk configured in lv-mirrored VG?

@HCL Ash: Better to study the withe paper again.

;-)

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!   
S.N.S
Valued Contributor

Re: which is the best approach to replace a failed disk configured in lv-mirrored VG?

Hi,

I strongly feel that cnd & Pete shud be awarded 10pts....

The link is a must for HPUX admins...

You would learn to learn later, quite sure :-)...


SNS
"Genius is 1% inspiration, 99% Perspiration" - Edison
Torsten.
Acclaimed Contributor

Re: which is the best approach to replace a failed disk configured in lv-mirrored VG?

By the way, there is no need to unmirror anything. Just stop LVM access to that disk (pvchange -a n), replace the disks, restore the configuration and allow access again. The WP has all the details.

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!   
stephen peng
Valued Contributor

Re: which is the best approach to replace a failed disk configured in lv-mirrored VG?

Torsten.
I am dealing with vg00, so i think i could not vgchange -a n vg00 when the system was still running. but your opinion gave me hint to deal with other VGs when such situation happens again.

thanks a lot!
Tim Nelson
Honored Contributor

Re: which is the best approach to replace a failed disk configured in lv-mirrored VG?

Torsten recommended "pvchange -a n " not vgchange


pvchange disables access to a PV not VG..

I would add that sometimes the disk marked with a stale extend is not neccessarily the bad disk.

dd if=/disk_you_think -of=/dev/null
(if no errors then repeat on the other disk as it is probably the one that is bad )

if the good disk has a stale extent then you are out of luck and will have to restore from tape or Ignite if OS..

stephen peng
Valued Contributor

Re: which is the best approach to replace a failed disk configured in lv-mirrored VG?

oh, sorry about my mistake. I should read the WP carefully.