Operating System - HP-UX
1752518 Members
5167 Online
108788 Solutions
New Discussion юеВ

Re: Mirrod disk replacement

 
vinay_26
Advisor

Mirrod disk replacement

Hi.

I have a Volume group with 2 disks.

And all the logical volume span accross one disk c1t3d0 and they are mirrored to the second disk c1t4d0.

The first disk has failed and had to be replaced. After replacement i am trying to doa vgcfgrestore and is not going through.

My question is
1.Do i need to do a vgreduce and extend it again?
2. what will happen to the mirrorev lv on the disk 1?
7 REPLIES 7
IT_2007
Honored Contributor

Re: Mirrod disk replacement

No you don't have to vgreduce.

Do this way.

ioscan -fn
insf -e
run ioscan -fnCdisk and make sure that you see new disk with same device name as CLAIMED.

vgcfgrestore -n vgname
vinay_26
Advisor

Re: Mirrod disk replacement

Yes i have done it after its in Claimed state.
# vgcfgrestore -R -n /dev/vg_das /dev/rdsk/c1t4d0
vgcfgrestore: Couldn't query physical volume "/dev/dsk/c1t4d0":
The specified path does not correspond to physical volume attached to
this volume group


disk 21 0/4/1/0.8.0.255.0.8.0 sdisk CLAIMED DEVICE HP 36.4GST336753FC
/dev/dsk/c1t4d0 /dev/rdsk/c1t4d0
IT_2007
Honored Contributor

Re: Mirrod disk replacement

It looks like you restored the disk but disk is not new one and it contains some information.

pvcreate -f /dev/rdsk/c1t4f0

and then run vgcfgrestore command.
Mridul Shrivastava
Honored Contributor

Re: Mirrod disk replacement

It is always recommended to deactivate the vg before executing vgcfgrestore if you don't have LVM OLAR patches installed on the system, please find below the details of LVM OLAR patches:
For 11.11: Patches PHKL_31216 and PHCO_30698 (or superseding patches)
o For 11.23: Patches PHKL_32095 and PHCO_31709 (or superseding patches)

If you have above mentioned patches then I would suggest you to do the following:

pvchange -a n
vgcfgrestore -n /dev/rdsk/
pvchange -a y
vgsync

HTH
Time has a wonderful way of weeding out the trivial
florin_10
Frequent Advisor

Re: Mirrod disk replacement

The following is assuming that you DO have a vgcfgbackup
1) Find the faulty disk.

2) Shutdown the system and replace disk

3) Boot in single user mode
ISL>hpux -is

4) Initialize the new disk for LVM
# pvcreate -f /dev/rdsk/cxtxd0
(this will force the intialization in case the disk in not brand new)
5) Restore vg on the replaced disk
# vgcfgrestore -n /dev/vgxx /dev/rdsk/cxtxd0

6) Activate the vg involved in the disk replacement (will also do the mirror
and sync it.)
# vgchange -a y /dev/vgxx

7) Once all mirroring is finished and as always after those type of changes
do a:
# shutdown -r now



The following is assuming that you do NOT have a vgcfgbackup
1) Before disk replacement.(disk is already located)
Reduce all the lvols in the vg on that disk
# lvreduce -m 0 /dev/vgxx/lvolx /dev/dsk/cxtxd0

2) Remove the disk form the vg
# vgreduce /dev/vgxx /dev/dsk/cxtxd0 (c1t3d0)

3) Shutdown and replace disk

4) Boot in single user mode
ISL>hpux -is

5) Initialize the new disk for LVM
# pvcreate -f /dev/rdsk/cxtxd0
(this will force the intialization in case the disk in not brand new)

6)Extend the the vgconcerned to the new disk
# vgextend /dev/dsk/vgxx /dev/dsk/cxtxd0

7) Recreate the mirrored lvols on that vg
# lvextend -m 1 /dev/vgxx/lvolx /dev/dsk/cxtxd0
.all of them.........................................
# lvextend -m 1 /dev/vgxx/lvoly /dev/dsk/cxtxd0

8) Now do a backup of vg
# vgcfgbackup /dev/vgxx

9) Reboot
#shutdown -r 0

Cheers
flg
Prashanth.D.S
Honored Contributor

Re: Mirrod disk replacement

Hi Vinay,

I hope you trying to do this on a right disk..

Check /etc/lvmconf/ for lvmconfiguration directory for backup files for that VG with the latest timestamp ..if not available you may have to create the VG again.

Best Regards,
Prashanth
Prashanth.D.S
Honored Contributor

Re: Mirrod disk replacement

Hi Vinay,

I hope you trying to do this on a right disk..

Check /etc/lvmconf/ directory for backup files for that VG with the latest timestamp ..if not available you may have to create the VG again.

Best Regards,
Prashanth