[ 天羽]pv問題定位,pvid重複
本來應該要hdiskpower73屬於vg_db2,hdiskpower144屬於vg_db4,現在發現hdiskpower73和hdiskpower144實際上好像是同一塊盤,無法分別在兩個VG裡。
怎麼解決?
問題現象
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
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=$2set -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 f=/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..145host:/@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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/1384/viewspace-611331/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- sql重複插入問題SQL
- android包重複問題Android
- 有重複元素的排列問題
- MySQL自增列的重複值問題(r12筆記第25天)MySql筆記
- webpack dll打包重複問題優化Web優化
- 資料檢視的重複問題
- element UI元件樣式重複問題UI元件
- 一次oracle 節點重啟問題的定位Oracle
- 併發請求的重複插入問題
- 解決表單重複提交的問題
- 關於SQL的重複記錄問題SQL
- strust2 重複提交的問題Rust
- 解決winform窗體重複建立問題ORM
- Androidstudio中jar包重複或jar包裡的類重複問題AndroidJAR
- 去除重複字母(不同字元的最小序列)問題字元
- 快速解決mongodb出現id重複問題MongoDB
- Android studio glide包重複問題AndroidIDE
- Vue echarts 繫結事件重複執行問題VueEcharts事件
- MySQL order by limit 分頁資料重複問題MySqlMIT
- 標準SQL寫法的重複列問題SQL
- Notification中Intent攜帶資料重複問題Intent
- 重複登入問題最終解決方法
- AIX pvid混亂,修改PVID與VGIDAI
- 定位和居中問題
- JVM問題定位工具JVM
- 分散式重複提交問題架構設計思路分散式架構
- 解決生產日誌重複列印的問題
- SwipeRefreshView重複下拉重新整理操作閃退問題View
- 探索RocketMQ的重複消費和亂序問題MQ
- 解決alertmanager重複傳送訊息的問題
- Openlayers4地圖重複出現的問題地圖
- kafka9重複消費問題解決Kafka
- 處理網站中的重複內容問題網站
- jquery中事件重複繫結以及解綁問題jQuery事件
- 使用外連線時應注意重複的問題
- “田由甲” - Kafka重複消費線上問題暴雷Kafka
- 重定位
- java實現pv操作 -------哲學家問題Java