Operating System - HP-UX
1753290 Members
5282 Online
108792 Solutions
New Discussion юеВ

Re: need to replace bad disk in mirror

 
SOLVED
Go to solution
Deepak Kr
Respected Contributor

Re: need to replace bad disk in mirror

William,

Once you replace the faulty disk successfully, follow these steps:

#ioscan -funC disk|more
new disk should recognised here!!

#pvcreate -f -B /dev/rdsk/c_t_d0

#vgcfgrestore -n vgname /dev/rdsk/c_t_d0

# vgchange -a y /dev/vgname

# vgsync vgname

check mirror status after vgsync is completed!!
"There is always some scope for improvement"
Torsten.
Acclaimed Contributor

Re: need to replace bad disk in mirror

@Kumar Deepak

why using "pvcreate -B ..." on a non-boot disk?

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!   
William Capen
Advisor

Re: need to replace bad disk in mirror

Are we using the same device name? The dead device is c4t4d0 so the restore should be done to the same device or should I look for a new one?
Patrick Wallek
Honored Contributor
Solution

Re: need to replace bad disk in mirror

The device file name should be the same.

If it is not currently showing up in ioscan, then what you should do is:

1) Replace the disk
2) ioscan -fnC disk
to make sure you see it. If the device file names are not showing up, then do
2a) insf -eC disk
to create the device files
2b) ioscan -fnC disk
to make sure the device files are now showing up in ioscan
3) pvcreate
4) vgcfgrestore
5) vgchange -a y vg??
6) vgsync
Torsten.
Acclaimed Contributor

Re: need to replace bad disk in mirror

With hp-ux 11.23 and a plain SCSI controller the device file will remain the same.

This could be different with 11.31 or SAS controllers, but you don't have this.

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!   
Deepak Kr
Respected Contributor

Re: need to replace bad disk in mirror

sorry for typo:

why using "pvcreate -B ..." on a non-boot disk?

pvcreate -f disk
"There is always some scope for improvement"
Torsten.
Acclaimed Contributor

Re: need to replace bad disk in mirror

Even this is not needed.

The "-f" is dangerous, if you use a wrong disk device file by accident.

The vgcfgrestore will do the same and more as the pvcreate - so pvcreate is not needed.

;-)

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!   
William Capen
Advisor

Re: need to replace bad disk in mirror

so once I run

ioscan -fnC disk
and
insf -eC disk

and the new device is seen by the system, I only need to do

vgcfgrestore -n vg01 /dev/rdsk/c4_t4_d0

vgchange -a y /dev/vg01

vgsync vg01

That's it?
Patrick Wallek
Honored Contributor

Re: need to replace bad disk in mirror

Yep, that should work.
William Capen
Advisor

Re: need to replace bad disk in mirror

YEA!!!!! I'm back! That was very scary due to the extreme importance of the file system but it worked! Thanks to ALL of you for your help!

Bill