pv问题定位,pvid重复

转载 2012年03月30日 17:43:48

本来应该要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

  • PV操作--经典问题分析

    为了提高在实际问题中分析和思考多个线程之间同步互斥问题的能力,接下来将讲解PV操作,这也是操作系统中的重点和难点。本文将会先简要介绍下PV操作的来源和基本使用方法,然后再通过两道经典的计算机考研真题—...
    • y824448940
    • y824448940
    • 2016年11月09日 16:36
    • 2113

    经典PV问题系列二:经典详解

    上一节讨论了计算机解决互斥问题的方法,这一节我们将
    • baijinze
    • baijinze
    • 2014年11月07日 22:38
    • 1722

    PV操作之独木桥问题

    一、东西向汽车过独木桥,为了保证安全,只要桥上无车,则允许一方的汽车过桥,待一方的汽车全部过完后,另一方的汽车才允许过桥。semaphore wait,mutex1,mutex2; mutex1=mu...
    • u010897957
    • u010897957
    • 2014年06月23日 14:00
    • 8053

    PVID和VID的理解

    VID解释  VID(VLAN ID)是VLAN的标识,在交换机里面用来划分端口。比如一个交换机有8个端口,现在将port1,port2,port5三个端口的VID设置成1111,那么这三个端口就能接...
    • silent123go
    • silent123go
    • 2017年04月12日 20:03
    • 2260

    PVID和VID详解

    Pvid和Vid经常出现于二、三层交换机里,由于PVID和VID的设置不合理,造成VLAN划分变得混乱。本文就对PVID和VID进行了彻底研究。 pvid是交换机上的概念,说的是进入该端口的报文...
    • misterdo
    • misterdo
    • 2015年09月24日 11:55
    • 11958

    操作系统PV操作及读者写者问题

    1、信号量: 2、P、V操作原语可描述为以下式子: 3、解释: 4、互斥模式原理: 5、同步模式原理: 6、读者写者问题:...
    • Remoa_Dengqinyi
    • Remoa_Dengqinyi
    • 2016年09月22日 15:59
    • 4441

    PV操作经典问题

    飞机票问题 Var A : ARRAY[1..m] of integer; mutex : semaphore; mutex:= 1; cobegin process Pi var Xi:...
    • u010897957
    • u010897957
    • 2014年06月22日 18:40
    • 1151

    生产者消费者问题(PV操作)

    一、明确定义 要理解生产消费者问题,首先应弄清PV操作的含义:PV操作是由P操作原语和V操作原语组成(原语是不可中断的过程),对信号量进行操作,具体定义如下:     P(S):①将信号量...
    • u014174955
    • u014174955
    • 2015年03月02日 19:53
    • 2694

    对PV操作问题的理解综合

    从最初接触PV操作,到有些许理解时候的赞叹,但是具体问题下,自己并不能做到顺畅的分解出问题中的进程与进程之间交织的关系。虽然作者在书中很清晰的总结了一些判断标准。 需要处理的关系只有两种:同步和互...
    • u011240016
    • u011240016
    • 2016年09月25日 21:06
    • 647

    关于PVID和VID的理解

    实践发现:一般配置了级联的trunk口之后,还可以将这个端口配置一个pvid。而对于access口,就没有配置pvid的选项。对于(华为和H3C)配置了hybrid口,也可以配置pvid,还可以配置p...
    • freefan1
    • freefan1
    • 2016年10月09日 13:35
    • 3065
    内容举报
    返回顶部
    收藏助手
    不良信息举报
    您举报文章:pv问题定位,pvid重复
    举报原因:
    原因补充:

    (最多只允许输入30个字)