# lsvpcfg
vpath0 (Avail pv datavg) 61316452 = hdisk2 (Avail )
vpath1 (Avail pv datavg) 71216452 = hdisk3 (Avail )
vpath2 (Avail pv datavg) 71316452 = hdisk4 (Avail )
# lsvg -p datavg
datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
vpath0 active 745 743 149..147..149..149..149
vpath1 active 458 458 92..92..91..91..92
vpath2 active 458 458 92..92..91..91..92
datavg 是个只有vpath的SDD VG,如果此时运行chdev 修改hdisk3的属性,系统将赋予hdisk3一个和vpath1一样的pvid。这样在ODM中,vpath1和hdisk3有一样的pvid。
# chdev -l hdisk3 -a pv=yes
hdisk3 changed
# lsvpcfg
vpath0 (Avail pv datavg) 61316452 = hdisk2 (Avail )
vpath1 (Avail pv datavg) 71216452 = hdisk3 (Avail pv datavg)
vpath2 (Avail pv datavg) 71316452 = hdisk4 (Avail )
# lsvg -p datavg
datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
vpath0 active 745 745 149..149..149..149..149
hdisk3 active 458 458 92..92..91..91..92
vpath2 active 458 458 92..92..91..91..92
其中vpath1被hdisk3代替,这是因为当datavg被激活时,LVM用hdisk3代替vpath1。现在datavg就是在vpath和hdisk并存的混合模式下工作,将丧失SDD VG的所有功能。可以用dpovgfix来修复。
# dpovgfix datavg
datavg
datavg contains following devices and pvids
00cd4e8fa39cf4940000000000000000 vpath0
00cd4e8fadddc4980000000000000000 hdisk3
00cd4e8faddddfe30000000000000000 vpath2
datavg
0518-307 odmdelete: 0 objects deleted.
Create vpath1 pvid of 00cd4e8fadddc4980000000000000000 in ODM database.
lname=vpath1, pvid=00cd4e8fadddc4980000000000000000
0518-307 odmdelete: 0 objects deleted.
varyon datavg was successful.
Volume Group datavg is cleaned up to dpo devices successfully.
# lsvg -p datavg
datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
vpath0 active 745 743 149..147..149..149..149
vpath1 active 458 458 92..92..91..91..92
vpath2 active 458 458 92..92..91..91..92
卷组被修复。