Operating System - HP-UX
1832574 Members
5633 Online
110043 Solutions
New Discussion

LVM problem whem the server lost mirror disk vg00

 
Luis Paulo Caputo
New Member

LVM problem whem the server lost mirror disk vg00

Hy everybody,
I have a problem with vg00.
it has already PE´s configured into vg00 but without the file /vg00/lvolX.
My case is lvol4 remained in the vg00 but the file /dev/vg00/rlvol4 doesn´t exist.

Thanks
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: LVM problem whem the server lost mirror disk vg00

Shalom,

Quickest way to fix it.

vgreduce -f vg00

Then pvcreate the replacement disk and re-mirror the system.

No shortcuts.

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk

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
Luis Paulo Caputo
New Member

Re: LVM problem whem the server lost mirror disk vg00

Hy Shalon,

I think that you don´t understand me.
I mean, i lost /dev/vg00/lvol4 files and the PE´s of lvol4 ramins in the /dev/vg00.
Unfurtunately the vgreduce -f /dev/vg00, results the follow:
ISSD2_/etc>vgreduce -f /dev/vg00
vgreduce: Couldn't query physical volume "/dev/dsk/c0t5d0":
The specified path does not correspond to physical volume attached to
this volume group
Not all extents are free. i.e. Out of 1023 PEs, only 919 are free.
You must free all PEs using lvreduce/lvremove before the PV can be removed.
Example: lvreduce -A n -m 0 /dev/vg01/lvol1.
lvremove -A n /dev/vg01/lvol1
Here's the map of used PEs

--- Logical extents ---
LE LV PE Status 1
0000 lvol4 0215 ???
0001 lvol4 0216 ???
0002 lvol4 0217 ???

What do you thik ?

Regards...
Aussan
Respected Contributor

Re: LVM problem whem the server lost mirror disk vg00

re-create the rlvol4 and sync it

mknod /dev/vg00/rlvol4 64 0x(the same number as lvol4)

once done try
lvsync

lvsync is usually used to sync the mirror..but if your mirror is good it should sync lvol4 also
The tongue weighs practically nothing, but so few people can hold it
Aussan
Respected Contributor

Re: LVM problem whem the server lost mirror disk vg00

i forgot the letter c

re-create the rlvol4 and sync it

mknod /dev/vg00/rlvol4 c 64 0x040000

make sure the minor number is the same as lvol4 it's usually 0x040000 unless you picked somthing diffrent

once done try
lvsync

lvsync is usually used to sync the mirror..but if your mirror is good it should sync lvol4 also
The tongue weighs practically nothing, but so few people can hold it
Mridul Shrivastava
Honored Contributor

Re: LVM problem whem the server lost mirror disk vg00

I understand you have just lost the devices for lvol... you can create the same using the above mentioned procedure for raw since block device is available.
Time has a wonderful way of weeding out the trivial
Luis Paulo Caputo
New Member

Re: LVM problem whem the server lost mirror disk vg00

Hy,
Excuse me for my absent.

I did what they mentioned above and when i synconized de lvol, appeared the folow message:
ISSD2_/>lvsynv /dev/vg00
ksh: lvsynv: not found
ISSD2_/>lvsync /dev/vg00/lvol4
lvsync: Couldn't re-synchronize stale partitions of the logical volume:
No such device
lvsync: Couldn't resynchronize logical volume "/dev/vg00/lvol4".
ISSD2_/>
But i know that the device c0t5d0 has been crashed and i have a new one, but i can´t insert the device again on the volume.

Thanks
Geoff Wild
Honored Contributor

Re: LVM problem whem the server lost mirror disk vg00

So, c0t5d0 was pulled from the system - then a new one added...

Sounds like an OLAR issue....

Try:

pvchange -a y /dev/dsk/c0t5d0

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.