Operating System - HP-UX
1848755 Members
5845 Online
104036 Solutions
New Discussion

One stale extent for /dev/vg00/lvol2 (swap)

 
SOLVED
Go to solution
Jack C. Mahaffey
Super Advisor

One stale extent for /dev/vg00/lvol2 (swap)

I have a server that has one stale extent for logical volume /dev/vg00/lvol2 (swap). Physical and logical volume is otherwise just fine. I'm running 11.0. If I run lvreduce on the logical volume to change the mirror count to one, will the stale extent be released? I will then run lvextend to recreate the mirror.


Sound okay?


jack...
14 REPLIES 14
Jack C. Mahaffey
Super Advisor

Re: One stale extent for /dev/vg00/lvol2 (swap)

Typo in original post. I want to run lvreduce to reduce mirror count to 0 and then later come back and run lvextend to recreate the mirror with 1.
Uday_S_Ankolekar
Honored Contributor

Re: One stale extent for /dev/vg00/lvol2 (swap)

There may be a disk has gone bad. In that case you might want to replace bad disk and run vgcfgrestore on that disk and a vgchange should fix the stale extents.

-USA..

Good Luck..
Jack C. Mahaffey
Super Advisor

Re: One stale extent for /dev/vg00/lvol2 (swap)

I recognize that replacing the disk with the stale extent is an option. I was wondering if running lvreduce would unmark the extent as stale so that I could recreate the mirror later with lvextend. Didn't know if the 'stale' setting is permanent. This is a weird case because there is only one extent on the entire disk marked as stale.

jack...
Mel Burslan
Honored Contributor

Re: One stale extent for /dev/vg00/lvol2 (swap)

To the best that I know, swap, root and stand i.e., lvol1, lvol2 and lvol3 of vg00 should be contiguous. Will you be able to provide contiguous space for the new mirror ?

Safest bet is to replace the disk with the stale extent as this may be the sign of bad things starting to happen to it, i.e. slow death.
________________________________
UNIX because I majored in cryptology...
DCE
Honored Contributor

Re: One stale extent for /dev/vg00/lvol2 (swap)

If you do not want break the mirrors, you could try lvsync and/or vgsync to try to resync the mirror
Jack C. Mahaffey
Super Advisor

Re: One stale extent for /dev/vg00/lvol2 (swap)

Already tried the vgsync and lvsync route... Didn't work.

I'm looking at the free extents and there are none so it looks like my only option would be to replace the disk. lvextend would likely fail anyway. Oh well...

It's only a four gb drive.

TwoProc
Honored Contributor

Re: One stale extent for /dev/vg00/lvol2 (swap)

Jack,

You're method should work. I used to do it this way years and years ago before I was convinced that vgcfgrestore and vgsync would do the job for me. Out of paranoia, I used to do it "by hand" like this.
We are the people our parents warned us about --Jimmy Buffett
Mahesh Kumar Malik
Honored Contributor

Re: One stale extent for /dev/vg00/lvol2 (swap)

Hi Jack

Breaking the mirror and vgsync may resolve the problem but it is advisable to replace the faulty disk.

Regards
Mahesh
Devender Khatana
Honored Contributor

Re: One stale extent for /dev/vg00/lvol2 (swap)

Hi,

Breaking the mirror and resyncing will not solve this as ultimately data is required to be written to disk in resync as well which is faulty. So only option left is disk replacement.

Also when disk start to die, depending upon the failure the performance of the system may get affected.

HTH,
Devender
Impossible itself mentions "I m possible"
generic_1
Respected Contributor

Re: One stale extent for /dev/vg00/lvol2 (swap)

I would look in stm and cstm and see if the disk looks like its going bad after the sync stuff.

This is an excellent document on replacing your disk, and fixing your mirror afterwords.

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

I think you have a sick disk, though, so I would replace it if it were mine, before you have more issues.
Devender Khatana
Honored Contributor
Solution

Re: One stale extent for /dev/vg00/lvol2 (swap)

Hi,

I still stuck to my old opinion of replacing the disk but if you are still searching for other options for some time then a read test will be the best to test the LVOL. As it is a mirror before the read test should be performed you should reduce the lvol from the faulty disk and then recreate a LVOL on it. Use dd to read all the contents of this new LVOL and copy it to null.

Suppose your new LVOL created in vg00 is lvol14. Then use this on the new LVOL.

#dd if=/dev/vg00/lvol14 of=/dev/null

It will read your lvol throughly and will report all IO errors. It is also possible that during this test it show more errors & cause system to slow downas the disk is faulty so plan at a suitable time accordingly.

HTH,
Devender
Impossible itself mentions "I m possible"
Jack C. Mahaffey
Super Advisor

Re: One stale extent for /dev/vg00/lvol2 (swap)

Thanks to all for the very useful info. I ended up replacing the disk. This thread will be useful in the future for me.

jack...
Ryan McKlveen
Advisor

Re: One stale extent for /dev/vg00/lvol2 (swap)

not sure if this has been brought up yet or not, but not sure exactly which disk the stale extent shows up on. I've experienced once upon a time that the stale extent was on the primary disk but it showed on the alternate - so I had to actually replace the primary disk. (stale extent was copied over apparently) - being swap not a great big deal - but just be sure which disk to drop out -
Jack C. Mahaffey
Super Advisor

Re: One stale extent for /dev/vg00/lvol2 (swap)

'stale' extent was on the primary disk of the system drives. It was the first extent for lvol2.