Operating System - HP-UX
1748031 Members
5214 Online
108757 Solutions
New Discussion юеВ

lvm VG corrupted HP-UX 11i

 
Dan Ryan_4
Occasional Advisor

lvm VG corrupted HP-UX 11i

Here's a puzzle
I have a VG in which the data is accessible but the Voulme group cofiguration is very strange.

Basically there are six lvols. The problem is
each lvol has a twin (not a mirror) .

For example lvdisplay -v on lvol10 and lvol2 shows the exact same locations on the same disk.

The same is true for lvol12 and lvol3.
The same is true for lvol1 and lvol9.

When I mirror lvol10 ... lvol2 also gets mirrored.

I would like to remove the twins any suggestions?

attached are the vgdisplay and some lvdisplay snippets. To clearly show what I'm trying to explain here.

thanks for your help


12 REPLIES 12
Abid Iqbal
Regular Advisor

Re: lvm VG corrupted HP-UX 11i

What commands you use to create mirror?
Any script used to create mirror?
OS?
Torsten.
Acclaimed Contributor

Re: lvm VG corrupted HP-UX 11i

Please post

# ls -l /dev/vg01

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
shikhar_1
Regular Advisor

Re: lvm VG corrupted HP-UX 11i

Hi,

I have seen your attached o/p and came to know that your lvols are not twin they are same in name but they are part of different vgs.(vg00 & vg01) and it is already mirrored.These same lvols belong to different vgs.We can have same name lvol for different vgs.

sapap1# lvdisplay -v /dev/vg01/lvol2 | more
Mirror copies 1
It is lvol of vg01 and it is already mirrored.Dont confuse with the lvol of vg00.


Torsten.
Acclaimed Contributor

Re: lvm VG corrupted HP-UX 11i

I expect the problem somewhere else.

If you look at it, you see

sapap1# lvdisplay -v /dev/vg01/lvol2 | more
...
00000 /dev/dsk/c1t0d0 01024 current /dev/dsk/c2t0d0 00256 current
...


and


lvdisplay -v /dev/vg01/lvol10 | more
...
00000 /dev/dsk/c1t0d0 01024 current /dev/dsk/c2t0d0 00256 current



Same PEs on disk!


So please post the

# ll /dev/vg01

output.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Dan Ryan_4
Occasional Advisor

Re: lvm VG corrupted HP-UX 11i

Hello,

The issue,two lvols pointing to the same PE,
is confined to the vg01 VG. My apologies for clouding the information with the vg00 data.

I was asked to increas the sapce on one of the FS, when I noticed the Lvols weren't mirrored. Upon further review I found the issue.

Interestinly I was able to extend the lovl and file system and mirror the lvols. So other than this configuration being totally incorrect it seems to working fine.

Again thanks for you assistance.

sapap1# ls -l /dev/vg01
total 0
crw-r--r-- 1 root sys 64 0x010000 Jan 29 2007 group
brw-r----- 1 root sys 64 0x010001 Feb 24 2007 lvol1
brw-r----- 1 root sys 64 0x010002 Feb 13 2007 lvol10
brw-r----- 1 root sys 64 0x010003 Feb 13 2007 lvol12
brw-r----- 1 root sys 64 0x010002 Feb 24 2007 lvol2
brw-r----- 1 root sys 64 0x010003 Feb 24 2007 lvol3
brw-r----- 1 root sys 64 0x010001 Feb 13 2007 lvol9
crw-r----- 1 root sys 64 0x010001 Feb 24 2007 rlvol1
crw-r----- 1 root sys 64 0x010002 Feb 13 2007 rlvol10
crw-r----- 1 root sys 64 0x010003 Feb 13 2007 rlvol12
crw-r----- 1 root sys 64 0x010002 Feb 24 2007 rlvol2
crw-r----- 1 root sys 64 0x010003 Feb 24 2007 rlvol3
crw-r----- 1 root sys 64 0x010001 Feb 13 2007 rlvol9
sapap1#
Torsten.
Acclaimed Contributor

Re: lvm VG corrupted HP-UX 11i

Look at this:

brw-r----- 1 root sys 64 0x010001 Feb 24 2007 lvol1
brw-r----- 1 root sys 64 0x010002 Feb 13 2007 lvol10
brw-r----- 1 root sys 64 0x010003 Feb 13 2007 lvol12
brw-r----- 1 root sys 64 0x010002 Feb 24 2007 lvol2
brw-r----- 1 root sys 64 0x010003 Feb 24 2007 lvol3
brw-r----- 1 root sys 64 0x010001 Feb 13 2007 lvol9



lvol1 and lvol9 are the same
lvol2 and lvol10 are the same
lvol3 and lvol12 are the same

You just have duplicated device files.

Move the lvol and rlvol files for lvol9/10/12 away.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Patrick Wallek
Honored Contributor

Re: lvm VG corrupted HP-UX 11i

This isn't right:

crw-r--r-- 1 root sys 64 0x010000 Jan 29 2007 group

brw-r----- 1 root sys 64 0x010001 Feb 24 2007 lvol1
brw-r----- 1 root sys 64 0x010001 Feb 13 2007 lvol9
brw-r----- 1 root sys 64 0x010002 Feb 24 2007 lvol2
brw-r----- 1 root sys 64 0x010002 Feb 13 2007 lvol10
brw-r----- 1 root sys 64 0x010003 Feb 13 2007 lvol12
brw-r----- 1 root sys 64 0x010003 Feb 24 2007 lvol3

crw-r----- 1 root sys 64 0x010001 Feb 24 2007 rlvol1
crw-r----- 1 root sys 64 0x010001 Feb 13 2007 rlvol9
crw-r----- 1 root sys 64 0x010002 Feb 24 2007 rlvol2
crw-r----- 1 root sys 64 0x010002 Feb 13 2007 rlvol10
crw-r----- 1 root sys 64 0x010003 Feb 24 2007 rlvol3
crw-r----- 1 root sys 64 0x010003 Feb 13 2007 rlvol12

Your minor numbers for the LVs are all duplicated. LV's 1 & 9, 2 & 10, 3 & 12 have the same minor number. That is not correct and is why you see strange output.

I'm not entirely sure how that could have happened and I'm really not sure how to go about fixing it.
Torsten.
Acclaimed Contributor

Re: lvm VG corrupted HP-UX 11i

Before moving away check fstab what is used.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Dan Ryan_4
Occasional Advisor

Re: lvm VG corrupted HP-UX 11i

Thank You all respondents, especially Torsten.
Removing the device files with duplicate minor numbers has made the VG vg01
configuration look much better. Although vgdisplay still reports 6 lvols.
I├в m thinking a vgexport vgimport at next maintenance window will fix that.

sapap1# vgdisplay -v /dev/vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 6
Open LV 3
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4341
VGDA 4
PE Size (Mbytes) 4
Total PE 8680
Alloc PE 7168
Free PE 1512
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol9
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 1024
Allocated PE 2048
Used PV 2

LV Name /dev/vg01/lvol10
LV Status available/syncd
LV Size (Mbytes) 3072
Current LE 768
Allocated PE 1536
Used PV 2

LV Name /dev/vg01/lvol12
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 256
Allocated PE 512
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c1t0d0
PV Status available
Total PE 4340
Free PE 756
Autoswitch On

PV Name /dev/dsk/c2t0d0
PV Status available
Total PE 4340
Free PE 756
Autoswitch On


sapap1# ls -l /dev/vg01
total 0
crw-r--r-- 1 root sys 64 0x010000 Jan 29 2007 group
brw-r----- 1 root sys 64 0x010002 Feb 13 2007 lvol10
brw-r----- 1 root sys 64 0x010003 Feb 13 2007 lvol12
brw-r----- 1 root sys 64 0x010001 Feb 13 2007 lvol9
crw-r----- 1 root sys 64 0x010002 Feb 13 2007 rlvol10
crw-r----- 1 root sys 64 0x010003 Feb 13 2007 rlvol12
crw-r----- 1 root sys 64 0x010001 Feb 13 2007 rlvol9
sapap1#