Operating System - HP-UX
1837187 Members
2507 Online
110114 Solutions
New Discussion

Re: lvreduce doesn't work

 
SOLVED
Go to solution
Konrad Hegner
Frequent Advisor

lvreduce doesn't work

Hello

We had a mirrored system (and it works fine). Than we did a shutdown, changed one HDD and restartet the computer again. The start was fine, but (of corse) the mirror was wrong know (stales). We tried to remove the mirroring (lvreduce -m 0 ...). Unfortunately it didn't work and now we have a bad situation:

lvdisplay -v /dev/vg00/lvol*
shows us the following lines:

00016 /dev/dsk/c2t6d0 00016 current ??? 00016 stale

In the /etc/lvmtab you can find the entry from both HDDs:
/dev/vg00
/dev/dsk/c2t6d0
/dev/dsk/c2t5d0
(c2t6d0 is the working HDD and c2t5d0 is the replaced disk)

Have anybody some ideas, for to remove the replaced disk.

Best Regards Konrad
3 REPLIES 3
Robert-Jan Goossens
Honored Contributor

Re: lvreduce doesn't work

Hi Konrad,

I think LVM is confused, (think) you replaced a disk before removing it from the configuration.

You could try to resotre the vg group configuration to the disk, but i think you will have to do it in maintenance mode .

vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t5d0

vgchange -a y /dev/vg00

and know you can remove the mirror from the configuration.

lvremove -m 0 .....

shutdown -r -y 0

Hope it helps,
Robert-Jan.
Kent Ostby
Honored Contributor
Solution

Re: lvreduce doesn't work

Konrad --

I agree that -lm boot and vgcfgrestore should do the trick.

From IPL:

hpux -lm

This will bring you into maintanence mode.

Then :
/sbin/vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t5d0

then vgchange -a y /dev/vg00

This will HANG for several minutes while the root disk resyncs to the mirror. Dont be alarmed.

If it comes right back then it may be doing some work in the background so dont reboot right away.

mount /usr
then do ps -ef | grep lvsync and dont reboot until the lvsyncs complete.

NOTE: you will also see "syncer" running but this is a totally different process.

When the "lvsync"s are done, reboot the box.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Michael Steele_2
Honored Contributor

Re: lvreduce doesn't work

You may have to refer to the PV Number to 'lvreduce' and the seldom used '-k' option:

A) lvdisplay -v -k /dev/vg00/lvol*

LE PV1 PE1 Status 1
0000 1 0198 Stale
0001 1 0199 Stale
0002 1 0200 Stale
0003 1 0201 Stale

B) You'll need the value of PV1. In this example PV1, which is stale, = 1.

C) lvreduce -m 0 -k /dev/vg00/lvol* 1

Note: Put the '1' at the end of the command.
Support Fatherhood - Stop Family Law