1753912 Members
8513 Online
108810 Solutions
New Discussion юеВ

Stale extents

 
SOLVED
Go to solution
joe_91
Super Advisor

Stale extents

This is my lvdisplay. Looks like the primary boot disk is bad. since i am booted off the primary disk now..what would be the stpes to replace it? Please advice

Joe

lvdisplay -v /dev/vg00/lvol1
--- 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

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t0d0 19 19
/dev/dsk/c2t1d0 19 19

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c2t0d0 00000 stale /dev/dsk/c2t1d0 00000 current
00001 /dev/dsk/c2t0d0 00001 stale /dev/dsk/c2t1d0 00001 current
00002 /dev/dsk/c2t0d0 00002 stale /dev/dsk/c2t1d0 00002 current
00003 /dev/dsk/c2t0d0 00003 stale /dev/dsk/c2t1d0 00003 current
00004 /dev/dsk/c2t0d0 00004 stale /dev/dsk/c2t1d0 00004 current
00005 /dev/dsk/c2t0d0 00005 stale /dev/dsk/c2t1d0 00005 current
00006 /dev/dsk/c2t0d0 00006 stale /dev/dsk/c2t1d0 00006 current
00007 /dev/dsk/c2t0d0 00007 stale /dev/dsk/c2t1d0 00007 current
00008 /dev/dsk/c2t0d0 00008 stale /dev/dsk/c2t1d0 00008 current
00009 /dev/dsk/c2t0d0 00009 stale /dev/dsk/c2t1d0 00009 current
00010 /dev/dsk/c2t0d0 00010 stale /dev/dsk/c2t1d0 00010 current
00011 /dev/dsk/c2t0d0 00011 stale /dev/dsk/c2t1d0 00011 current
00012 /dev/dsk/c2t0d0 00012 stale /dev/dsk/c2t1d0 00012 current
00013 /dev/dsk/c2t0d0 00013 current /dev/dsk/c2t1d0 00013 current
00014 /dev/dsk/c2t0d0 00014 current /dev/dsk/c2t1d0 00014 current
00015 /dev/dsk/c2t0d0 00015 current /dev/dsk/c2t1d0 00015 current
00016 /dev/dsk/c2t0d0 00016 current /dev/dsk/c2t1d0 00016 current
00017 /dev/dsk/c2t0d0 00017 current /dev/dsk/c2t1d0 00017 current
00018 /dev/dsk/c2t0d0 00018 current /dev/dsk/c2t1d0 00018 current

#
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: Stale extents

Shalom,

Good news is you have proven your mirroring works.

Best thing to do is try and break all those nice mirrors and vgreduce the disk out of there.

If that fails, vgreduce -f vg00 /dev/dsk/c2t0d0

Will probably work.

Then replace the disk, pvcreate it and rebuild the mirrors.

Since you have a workng mirror, its safe to assume you know how to do it right.

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
James R. Ferguson
Acclaimed Contributor

Re: Stale extents

Hi Joe:

You should read:

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

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Stale extents

I'll assume that your disk is hot-pluggable so that there is no need to even shutdown.

1) Pull the bad disk a few centimeters out of its slot and allow it to spin down. Wait about 90 seconds and then remove the disk completely.
2) Insert the replacement disk.
3) vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t0d0
4) vgchange -a y /dev/vg00
5) mkboot /dev/rdsk/c2t0d0
6) mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t0d0
7) lvlnboot -R
8) vgsync /dev/vg00 # this will take a while




If it ain't broke, I can fix that.
joe_91
Super Advisor

Re: Stale extents

Our Management needs to follow a process where they need to have the machine shutdown. Given that the case, what would be the process?

THanks

Joe
James R. Ferguson
Acclaimed Contributor
Solution

Re: Stale extents

Hi Joe:

Process? Well, the whitepaper (link) that I posted above offers the appropriate scenarios. I urge you to read it -- it's not very long. It also points to LVM Online Replacement (OLR) patches that everyone should apply!

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Stale extents

Process? We don't need no stinkin' process. The fault is entirely yours as you should have already had a documented procedure in place that covers all the permutations and combinations of disk replacement mirrored/unmirrored/boot/non-boot/LVM/VxVM/whole disk. Moreover, you should have monitoring systems in place so that you are alerted in a very timely manner whenever a failure occurs. The idea is that you do you job so well that everyone has to ask just what is it that you do because ip APPEARS that you do very, very little.
If it ain't broke, I can fix that.
TwoProc
Honored Contributor

Re: Stale extents

Actually, to recover from this - you don't need to go down. You can stay up and fix this. Please refer to the whitepaper referred to by James F. - it's a great document that covers this topic so very well.
We are the people our parents warned us about --Jimmy Buffett
A. Clay Stephenson
Acclaimed Contributor

Re: Stale extents

I literally cannot remember the last time I shutdown a box in order to replace a disk (even a boot disk) but I'm certain that it's been more than 7 years. The above mentioned document is a very good starting point for your procedures but shutdown is not necessary except in the case of disks which are not hot-pluggable. All the newer boxes have hot-pluggable disks but as an example even on boxes which did use internal non-hot-pluggable drives (e.g. the old K-boxes) the answer was to never use the internal drives and alway use external hot-plug drives instead.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Stale extents

Your management does not seem to understand 24x7 uptime as designed into HP-UX for many years. So if there is no choice, follow all the steps listed, then after the last step (vgsync) just reboot your machine. That way, the machine will off for a few minutes.


Bill Hassell, sysadmin