pv问题定位,pvid重复

本来应该要hdiskpower73属于vg_db2,hdiskpower144属于vg_db4,现在发现hdiskpower73和hdiskpower144实际上好像是同一块盘,无法分别在两个VG里。
怎么解决?
问题现象

host:/@root>#extendvg vg_db2 hdiskpower73

.(此时hdiskpower144在vg_db4)

0516-1398 extendvg: The physical volume hdiskpower73, appears to belong to
another volume group. Use the force option to add this physical volume
to a volume group
0516-792 extendvg: Unable to extend volume group.
host:/@root>#extendvg -f vg_db2 hdiskpower73
host:/@root>#lsvg -p vg_db2

vg_db2:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdiskpower51 active 725 724 145..144..145..145..145
hdiskpower52 active 725 724 145..144..145..145..145
hdiskpower53 active 725 724 145..144..145..145..145
hdiskpower54 active 725 724 145..144..145..145..145
hdiskpower55 active 725 725 145..145..145..145..145
hdiskpower56 active 725 725 145..145..145..145..145
hdiskpower57 active 725 725 145..145..145..145..145
hdiskpower58 active 725 725 145..145..145..145..145
hdiskpower59 active 725 725 145..145..145..145..145
hdiskpower60 active 725 725 145..145..145..145..145
hdiskpower61 active 725 725 145..145..145..145..145
hdiskpower62 active 725 725 145..145..145..145..145
hdiskpower63 active 725 725 145..145..145..145..145
hdiskpower64 active 725 725 145..145..145..145..145
hdiskpower65 active 725 725 145..145..145..145..145
hdiskpower66 active 725 725 145..145..145..145..145
hdiskpower67 active 725 725 145..145..145..145..145
hdiskpower68 active 725 725 145..145..145..145..145
hdiskpower69 active 725 725 145..145..145..145..145
hdiskpower70 active 725 725 145..145..145..145..145
hdiskpower71 active 725 725 145..145..145..145..145
hdiskpower72 active 725 725 145..145..145..145..145
hdiskpower144 active 725 725 145..145..145..145..145
hdiskpower74 active 725 725 145..145..145..145..145
hdiskpower75 active 725 725 145..145..145..145..145
hdiskpower76 active 725 725 145..145..145..145..145
hdiskpower77 active 725 725 145..145..145..145..145
hdiskpower78 active 725 725 145..145..145..145..145
hdiskpower79 active 725 725 145..145..145..145..145
hdiskpower80 active 725 725 145..145..145..145..145
hdiskpower81 active 725 725 145..145..145..145..145
hdiskpower82 active 725 725 145..145..145..145..145
hdiskpower83 active 725 725 145..145..145..145..145
hdiskpower84 active 725 725 145..145..145..145..145
hdiskpower85 active 725 725 145..145..145..145..145
hdiskpower86 active 725 725 145..145..145..145..145

host:/@root>#lspv hdiskpower73

PHYSICAL VOLUME: hdiskpower144 VOLUME GROUP: vg_db2
PV IDENTIFIER: 00c4b454e06cf223 VG IDENTIFIER 00c4b45400004c0000000120f125e3da
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 32 megabyte(s) LOGICAL VOLUMES: 0
TOTAL PPs: 725 (23200 megabytes) VG DESCRIPTORS: 1
FREE PPs: 725 (23200 megabytes) HOT SPARE: no
USED PPs: 0 (0 megabytes) MAX REQUEST: 256 kilobytes
FREE DISTRIBUTION: 145..145..145..145..145
USED DISTRIBUTION: 00..00..00..00..00

host:/@root>#lspv hdiskpower144

PHYSICAL VOLUME: hdiskpower144 VOLUME GROUP: vg_db2
PV IDENTIFIER: 00c4b454e06cf223 VG IDENTIFIER 00c4b45400004c0000000120f125e3da
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 32 megabyte(s) LOGICAL VOLUMES: 0
TOTAL PPs: 725 (23200 megabytes) VG DESCRIPTORS: 1
FREE PPs: 725 (23200 megabytes) HOT SPARE: no
USED PPs: 0 (0 megabytes) MAX REQUEST: 256 kilobytes
FREE DISTRIBUTION: 145..145..145..145..145
USED DISTRIBUTION: 00..00..00..00..00

lspv –p vg_db4,发现hdiskpower144不在vg_db4上了,那么,把hdiskpower144加入vg_db4,修改hdiskpower73成vg_db2的VGID,这样应该就可以在不同的VG上了。
改hdiskpower73的VGID
./chvgid.sh f125e3da hdiskpower73

chvgid.sh的内容:
cat > chvgid.sh
#!/usr/bin/ksh
vgid=$1
disk=$2

set -A a `echo $vgid|\
awk '{
for (f=1; f <= length($0); f=f+2) {
print "ibase=16\nobase=8\n"toupper(substr($0,f,2))
}
}'|bc 2>/dev/null`
/usr/bin/echo "\0"${a[0]}"\0"${a[1]}"\0"${a[2]}"\0"${a[3]}"\c"|dd bs=1 seek=3600 of=/dev/$disk

lspv hdiskpower73,发现被指向hdiskpower77,hdiskpower77属于vg_db2。hdiskpower144在vg_db4上正常工作,这样问题应该在hdiskpower73。

删掉hdiskpower73重新认
host:/@root>#varyoffvg vg_db2
host:/@root>#rmdev -dl hdiskpower73
hdiskpower73 deleted
host:/@root>#cfgmgr
发现问题依旧,查看磁盘的pvid

host:/@root>#lquerypv -h /dev/hdiskpower73
00000000 C9C2D4C1 00000000 00000000 00000000 |................|
00000010 00000000 00000000 00000000 00000000 |................|
00000020 00000000 00000000 00000000 00000000 |................|
00000030 00000000 00000000 00000000 00000000 |................|
00000040 00000000 00000000 00000000 00000000 |................|
00000050 00000000 00000000 00000000 00000000 |................|
00000060 00000000 00000000 00000000 00000000 |................|
00000070 00000000 00000000 00000000 00000000 |................|
00000080 00C4B454 E074AE5E 00000000 00000000 |...T.t.^........|
00000090 00000000 00000000 00000000 00000000 |................|
000000A0 00000000 00000000 00000000 00000000 |................|
000000B0 00000000 00000000 00000000 00000000 |................|
000000C0 00000000 00000000 00000000 00000000 |................|
000000D0 00000000 00000000 00000000 00000000 |................|
000000E0 00000000 00000000 00000000 00000000 |................|
000000F0 00000000 00000000 00000000 00000000 |................|

查看hdiskpower77的pvid

host:/@root>#lquerypv -h /dev/hdiskpower77
00000000 C9C2D4C1 00000000 00000000 00000000 |................|
00000010 00000000 00000000 00000000 00000000 |................|
00000020 00000000 00000000 00000000 00000000 |................|
00000030 00000000 00000000 00000000 00000000 |................|
00000040 00000000 00000000 00000000 00000000 |................|
00000050 00000000 00000000 00000000 00000000 |................|
00000060 00000000 00000000 00000000 00000000 |................|
00000070 00000000 00000000 00000000 00000000 |................|
00000080 00C4B454 E074AE5E 00000000 00000000 |...T.t.^........|
00000090 00000000 00000000 00000000 00000000 |................|
000000A0 00000000 00000000 00000000 00000000 |................|
000000B0 00000000 00000000 00000000 00000000 |................|
000000C0 00000000 00000000 00000000 00000000 |................|
000000D0 00000000 00000000 00000000 00000000 |................|
000000E0 00000000 00000000 00000000 00000000 |................|
000000F0 00000000 00000000 00000000 00000000 |................|

发现hdiskpower73和hdiskpower77的PVID是一样的,把hdiskpower73的pvid重置一下。
host:/@root>#
host:/@root>#chdev -l hdiskpower73 -a pv=clear
hdiskpower73 changed
host:/@root>#lspv hdiskpower73
0516-304 : Unable to find device id hdiskpower73 in the Device
Configuration Database.

host:/@root>#lquerypv -h /dev/hdiskpower73

00000000 C9C2D4C1 00000000 00000000 00000000 |................|
00000010 00000000 00000000 00000000 00000000 |................|
00000020 00000000 00000000 00000000 00000000 |................|
00000030 00000000 00000000 00000000 00000000 |................|
00000040 00000000 00000000 00000000 00000000 |................|
00000050 00000000 00000000 00000000 00000000 |................|
00000060 00000000 00000000 00000000 00000000 |................|
00000070 00000000 00000000 00000000 00000000 |................|
00000080 00000000 00000000 00000000 00000000 |................|
00000090 00000000 00000000 00000000 00000000 |................|
000000A0 00000000 00000000 00000000 00000000 |................|
000000B0 00000000 00000000 00000000 00000000 |................|
000000C0 00000000 00000000 00000000 00000000 |................|
000000D0 00000000 00000000 00000000 00000000 |................|
000000E0 00000000 00000000 00000000 00000000 |................|
000000F0 00000000 00000000 00000000 00000000 |................|

清除了hdiskpower73的PVID后,重认。
host:/@root>#chdev -l hdiskpower73 -a pv=yes
hdiskpower73 changed
host:/@root>#lquerypv -h /dev/hdiskpower73
00000000 C9C2D4C1 00000000 00000000 00000000 |................|
00000010 00000000 00000000 00000000 00000000 |................|
00000020 00000000 00000000 00000000 00000000 |................|
00000030 00000000 00000000 00000000 00000000 |................|
00000040 00000000 00000000 00000000 00000000 |................|
00000050 00000000 00000000 00000000 00000000 |................|
00000060 00000000 00000000 00000000 00000000 |................|
00000070 00000000 00000000 00000000 00000000 |................|
00000080 00C4B454 FE6F2375 00000000 00000000 |...T.o#u........|
00000090 00000000 00000000 00000000 00000000 |................|
000000A0 00000000 00000000 00000000 00000000 |................|
000000B0 00000000 00000000 00000000 00000000 |................|
000000C0 00000000 00000000 00000000 00000000 |................|
000000D0 00000000 00000000 00000000 00000000 |................|
000000E0 00000000 00000000 00000000 00000000 |................|
000000F0 00000000 00000000 00000000 00000000 |................|

host:/@root>#varyonvg vg_db2
host:/@root>#lspv hdiskpower73
0516-320 : Physical volume hdiskpower73 is not assigned to
a volume group.
host:/@root>#extendvg vg_db2 hdiskpower73
0516-1398 extendvg: The physical volume hdiskpower73, appears to belong to
another volume group. Use the force option to add this physical volume
to a volume group.
0516-792 extendvg: Unable to extend volume group.

host:/@root>#extendvg -f vg_db2 hdiskpower73
最后检查一下:

host:/@root>#lsvg -p vg_db2
vg_db2:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdiskpower51 active 725 724 145..144..145..145..145
hdiskpower52 active 725 724 145..144..145..145..145
hdiskpower53 active 725 724 145..144..145..145..145
hdiskpower54 active 725 724 145..144..145..145..145
hdiskpower55 active 725 725 145..145..145..145..145
hdiskpower56 active 725 725 145..145..145..145..145
hdiskpower57 active 725 725 145..145..145..145..145
hdiskpower58 active 725 725 145..145..145..145..145
hdiskpower59 active 725 725 145..145..145..145..145
hdiskpower60 active 725 725 145..145..145..145..145
hdiskpower61 active 725 725 145..145..145..145..145
hdiskpower62 active 725 725 145..145..145..145..145
hdiskpower63 active 725 725 145..145..145..145..145
hdiskpower64 active 725 725 145..145..145..145..145
hdiskpower65 active 725 725 145..145..145..145..145
hdiskpower66 active 725 725 145..145..145..145..145
hdiskpower67 active 725 725 145..145..145..145..145
hdiskpower68 active 725 725 145..145..145..145..145
hdiskpower69 active 725 725 145..145..145..145..145
hdiskpower70 active 725 725 145..145..145..145..145
hdiskpower71 active 725 725 145..145..145..145..145
hdiskpower72 active 725 725 145..145..145..145..145
hdiskpower73 active 725 725 145..145..145..145..145
hdiskpower74 active 725 725 145..145..145..145..145
hdiskpower75 active 725 725 145..145..145..145..145
hdiskpower76 active 725 725 145..145..145..145..145
hdiskpower77 active 725 725 145..145..145..145..145
hdiskpower78 active 725 725 145..145..145..145..145
hdiskpower79 active 725 725 145..145..145..145..145
hdiskpower80 active 725 725 145..145..145..145..145
hdiskpower81 active 725 725 145..145..145..145..145
hdiskpower82 active 725 725 145..145..145..145..145
hdiskpower83 active 725 725 145..145..145..145..145
hdiskpower84 active 725 725 145..145..145..145..145
hdiskpower85 active 725 725 145..145..145..145..145
hdiskpower86 active 725 725 145..145..145..145..145

host:/@root>#lspv hdiskpower73
PHYSICAL VOLUME: hdiskpower73 VOLUME GROUP: vg_db2
PV IDENTIFIER: 00c4b454fe6f2375 VG IDENTIFIER 00c4b45400004c0000000120f125e3da
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 32 megabyte(s) LOGICAL VOLUMES: 0
TOTAL PPs: 725 (23200 megabytes) VG DESCRIPTORS: 1
FREE PPs: 725 (23200 megabytes) HOT SPARE: no
USED PPs: 0 (0 megabytes) MAX REQUEST: 256 kilobytes
FREE DISTRIBUTION: 145..145..145..145..145
USED DISTRIBUTION: 00..00..00..00..00

PVID 是由设备系列号加上一个时间戳组成的,很少有机会重复,关于重复PVID,可以参考:

http://www-01.ibm.com/support/docview.wss?uid=isg1IY88240

 

原文地址:  http://www.taobaodba.com/html/267_same_pvid_on_different_pv.html

阅读更多
个人分类: aix
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

pv问题定位,pvid重复

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭