1834456 Members
3115 Online
110067 Solutions
New Discussion

restore mirror disk

 
SOLVED
Go to solution
Antonio Cardoso_1
Trusted Contributor

restore mirror disk

Hi,
On a HP-UX 11iv1 with mirror-UX configured, a reboot occured with a mirror device unplugged, I have now:

# pvdisplay -v /dev/dsk/c2t1d0
pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t1d0":
The specified path does not correspond to physical volume attached to
this volume group
pvdisplay: Warning: couldn't query all of the physical volumes.
pvdisplay: Couldn't retrieve the names of the physical volumes
belonging to volume group "/dev/vg00".
pvdisplay: Cannot display physical volume "/dev/dsk/c2t1d0".

# lvdisplay /dev/vg00/lvol1
lvdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t1d0":
The specified path does not correspond to physical volume attached to
this volume group
lvdisplay: Warning: couldn't query all of the physical volumes.
--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/stale
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 304
Current LE 19
Allocated PE 38
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

Al though, ioscan shows the second device available:
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GMAS3735NC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 1 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GMAS3735NC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0

==> is there a way to ask system to re-attach the device to VG ?
Or do I need to remove all mirror copies and reduce / extend again ?

thanks.
7 REPLIES 7
Rajeev  Shukla
Honored Contributor

Re: restore mirror disk

Do a vgcfgrestore on the second disk you have attached. That will restore the VG information on the new disk and resync all your LV
Antonio Cardoso_1
Trusted Contributor

Re: restore mirror disk

I already tried this, command:
vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t1d0
returned OK, but it didn't solve the problem.
Devender Khatana
Honored Contributor
Solution

Re: restore mirror disk

Hi,

only one command shall be enough to resync it.

#vgchange -a y /dev/vg00

HTH,
Devender
Impossible itself mentions "I m possible"
Antonio Cardoso_1
Trusted Contributor

Re: restore mirror disk

Thanks devender,
I now have it restored, with lvols in "stale" status. I guess they will return to "syncd" state after a while? or do I need to explicitly request synchronization?

thanks,
antonio.

vgdisplay -v /dev/vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 13
Open LV 13
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4384
VGDA 4
PE Size (Mbytes) 16
Total PE 8748
Alloc PE 6022
Free PE 2726
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/stale
LV Size (Mbytes) 304
Current LE 19
Allocated PE 38
Used PV 2
Devender Khatana
Honored Contributor

Re: restore mirror disk

Hi,

Yes it will initiate the resyncing process which will take some time depending upon the current usage and disk sizes. You can monitor the process by grepping the stale extents like

#lvdisplay -v /dev/vg00/lvol1 |grep -i stale |wc -l

The syncing will be in sequence for lvol1,2,3 and so on.

HTH,
Devender
Impossible itself mentions "I m possible"
Antonio Cardoso_1
Trusted Contributor

Re: restore mirror disk

OK, thanks.
Antonio Cardoso_1
Trusted Contributor

Re: restore mirror disk

closing thread.