Operating System - HP-UX
1755702 Members
2614 Online
108837 Solutions
New Discussion юеВ

Problems with mirrored logical volume

 
SOLVED
Go to solution
Arnold Ferrer
New Member

Problems with mirrored logical volume

I'm getting the following messages when I do a vgdisplay and lvldisplay. There was a bad disk that's been replaced on this mirrored root disk. Running HP11.00 on a L2000 server

# vgdisplay -v vg00
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c1t2d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 3
Open LV 3
Max PV 16
Cur PV 2
Act PV 1
Max PE per PV 2500
VGDA 2
PE Size (Mbytes) 4
Total PE 2169
Alloc PE 2169
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

# lvdisplay -v /dev/vg00/lvol3 | more
lvdisplay: Warning: couldn't query physical volume "/dev/dsk/c1t2d0":
The specified path does not correspond to physical volume attached to
this volume group
lvdisplay: Warning: couldn't query all of the physical volumes.
--- Logical volumes ---
LV Name /dev/vg00/lvol3
VG Name /dev/vg00
LV Permission read/write
LV Status available/stale
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 6028
Current LE 1507
Allocated PE 3014
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/c2t2d0 1507 1507

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
0000 ??? 0662 stale /dev/dsk/c2t2d0 0662 current
0001 ??? 0663 stale /dev/dsk/c2t2d0 0663 current
0002 ??? 0664 stale /dev/dsk/c2t2d0 0664 current
0003 ??? 0665 stale /dev/dsk/c2t2d0 0665 current
0004 ??? 0666 stale /dev/dsk/c2t2d0 0666 current
0005 ??? 0667 stale /dev/dsk/c2t2d0 0667 current
7 REPLIES 7
Tom Danzig
Honored Contributor

Re: Problems with mirrored logical volume

Try:
vgcfgrestore -v /dev/vg00 /dev/dsk/c1t2d0
vgchange -a y /dev/vg00
vgsync /dev/vg00

This should restore the LVM config info to the disk.

If the disk was a bootable miiror, you need to do the necessary mkboot and lvlnboot steps also to make it bootable.
Tom Danzig
Honored Contributor

Re: Problems with mirrored logical volume

Error in last post:

vgcfgrestore -v /dev/vg00 /dev/dsk/c1t2d0

should be

vgcfgrestore -v /dev/vg00 /dev/rdsk/c1t2d0
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Problems with mirrored logical volume

Hi Arnold,

After replacing the bad disk, there is a procedure to follow to restore the mirrors. I Do the following.

Note the contents of lvlnboot -v

#vgcfgrestore -n vg00 /dev/rdsk/c1t2d0
#vgchange -a y vg00
#mkboot /dev/dsk/c1t2d0
#mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/dsk/c1t2d0
#cd /usr/sbin/diag/lif
#mkboot -vg updatediaglif2 -p ISL -p HPUX -p AUTO /dev/rdsk/c1t2d0
#vgsync
#lvlnboot -b /dev/vg00/lvol1
#lvlnboot -r /dev/vg00/lvol3
#lvlnboot -s /dev/vg00/lvol2
#lvlnboot -d /dev/vg00/lvol2

Correct the above lvols from your old lvlnboot -v output.

#lvlnboot -R

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ashwani Kashyap
Honored Contributor

Re: Problems with mirrored logical volume

Looks like your disk /dev/dsk/c1t2d0 has failed .

Do an lvdisplay on other logical volumes on that disk . If they don't show any stale extents then the problem is only with your /dev/vg00/lvol3 .

Do a diskinfo on that disk . Also do a pvdisplay on that disk . If both are succesful then your disk is alive and you only have to do a vgcfgrestore as decrbed in the above post .

But if not then you will have to replace the disk and resynx the VG onto it .

Look for disk errors in dmesg or your syslog.log file and check for any disk errors.

By guess is you have lost the PV .
Sanjay_6
Honored Contributor

Re: Problems with mirrored logical volume

Hi Arnold,

Either you have a faulty disk at /dev/dsk/c1t2d0 or after replacing the disk, you have not rebuilt the mirror. If it is a faulty disk, replace the disk and then rebuild the mirror. If you have not rebuild the mirror, take a look at the doc below on how to do that,

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062909815

Hope this helps.

Regds
Rajiv Singhal
Advisor

Re: Problems with mirrored logical volume

Hi Arnold,

I am curious to know that vgdisplay output shows Current PV 2 Active PV 1 .

does diskinfo /dev/rdsk/c1t2d0 is normal . If not then disk is certainly bad.

Try give strings /etc/lvmtab and see how may disks are part of vg00. Is it only two disks or more . If there are only two then certainly
/dev/rdsk/c1t2d0 has gone bad & the commands as suggested by Tom , Sri, Ashwani & Sanjay will work .

If there are three or more PV then Is there any logical volume spanned across three or more PV .

Thanks,

Rajiv
Arnold Ferrer
New Member

Re: Problems with mirrored logical volume

I just wanted to say, thanks for all the helpful replies.