Operating System - HP-UX
1748128 Members
3475 Online
108758 Solutions
New Discussion юеВ

Re: mirrored vg00 with stale extents on both volumes

 
Peter Heinemann
Frequent Advisor

mirrored vg00 with stale extents on both volumes

Had this problem today and wondering if there was another way out besides restoring via ignite (which was what we eventually did).

EMS called out a media failure on one of the two scsi volumes mirroring vg00. Prior to replacement I went to reduce the failing volume out of the lvols, but two would not reduce because there were stale extents on both volumes. Couldn't reduce because of it; couldn't run lvsynch or vgsynch because of i/o error returned by the failing disk...

one of the lvols was lvol4 and there was only 1 stale extent towards the end of the "good" volume allocation so I was able to lvreduce lvol4's size (shrinking it so the end was before the stale extent) and could then lvreduce the failing disk out of it.

However, the other was lvol2, and the "good" disk had many more stale extents, and these were closer to the beginning of the allocation so I didn't try shrinking the size.

Tried to force out the bad pv by mv-ing lvmtab, pvcreating -f the failing disk, and running vgscan but this left me with the no vg00 in lvmtab due to an lvm error (sorry, can't recall the exact text) with no luck.

After replacing lvmtab from the copy, I hot-swapped the drive then tried doing a vgcfgrestore. However, the lvm still reported the two-disk stale extents on lvol2.

Attempted a reboot to maintenance mode and an lvrmboot -s, but that dutifully reported that the extents were inconsistent between the two volumes! (hp-ux is nothing if not persistent!)

Course, the Ignite restore ended up being faster that the couple hours I tried the manual approach, but if anyone has run into this problem and was able to get out of it with lvm commands I'd be very interested to learn of it. Thanks...
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: mirrored vg00 with stale extents on both volumes

Shalom Peter,

If the disk involved is not totally dead, sometimes lvsync will fix it enough.

Then you use lvsplit to break the mirrors, lvreduce to force the bad disk out of the vg and then replace the disk, pvcreate it and mirror once again.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Peter Heinemann
Frequent Advisor

Re: mirrored vg00 with stale extents on both volumes

Tried that, but (noted above) lvsync rfailed due to an I/O error returned from the failing disk.
tamil sevan
Occasional Contributor

Re: mirrored vg00 with stale extents on both volumes

It happen to me b4, what i did was
1/ do vgchange -a y /dev/vg00

if it doesn't work than you can try to do

2/ vgimport -v /dev/vg00 /dev/dsk/cxtxdx /dev/vg00/cxtxdx

Good luck!
Tamil