亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 3301 | 回復(fù): 0
打印 上一主題 下一主題

HPUX v11.11 在線去掉壞的Mirror根盤測試 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2007-07-29 22:44 |只看該作者 |倒序瀏覽
  前兩天客戶有臺根盤做了Mirror的RP7410啟不來了,幸好有MC/SG雙機環(huán)境。
兩塊內(nèi)置硬盤在另一臺RP7410上做diskinfo都沒返回信息,估計可能是兩塊
盤都出現(xiàn)故障了。后來停掉業(yè)務(wù)停機,在拔出另一臺RP7410雙機做了Mirror
的內(nèi)置硬盤,插在故障機器上通過取消根盤Mirror,以及用新硬盤重做根盤
Mirror等操作才得以恢復(fù)。
  由于整個故障排除不在現(xiàn)場,現(xiàn)根據(jù)這樣的情況在自已的HP9000 C3000機器
上做個完整的HPUX v11.11根盤Mirror及去掉一塊硬盤后取消根盤Mirror的測試:
測試環(huán)境:
主機    HP9000 C3000
OS     HP_UX v11.11
內(nèi)置硬盤  18.2GB*2
  安裝HP_UX v11.11操作系統(tǒng)及補丁這里略過,將HP_UX 11i的Application
Software四張安裝CD的第一張放入光驅(qū),
#mkdir /cdrom
#ioscan -fnC disk
Class     I  H/W Path       Driver S/W State   H/W Type     Description
=======================================================================
disk      0  10/0/14/0.0.0  sdisk CLAIMED     DEVICE       TEAC    CD-532E-B
                           /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0
disk      1  10/0/15/1.5.0  sdisk CLAIMED     DEVICE       COMPAQ  BD0186349B
                           /dev/dsk/c3t5d0   /dev/rdsk/c3t5d0
disk      2  10/0/15/1.6.0  sdisk CLAIMED     DEVICE       COMPAQ  BD0186349B
                           /dev/dsk/c3t6d0   /dev/rdsk/c3t6d0
#mount /dev/dsk/c0t0d0 /cdrom
#swinstall -s /cdrom
  在列表里找到B5403BA B.11.11 MirrorDisk/UX并執(zhí)行安裝,缺省安裝這個軟
件會重新編譯內(nèi)核,安裝完成后系統(tǒng)自動重新啟動。啟動完成后就開始做根盤的Mirror
由于系統(tǒng)是安裝在c3t5d0上,另一塊盤c3t6d0做鏡像盤。
#pvcreate -fB /dev/rdsk/c3t6d0
#vgextend /dev/vg00 /dev/dsk/c3t6d0
#vgdisplay -v vg00
  確認根盤的8個LV,并且c3t6d0已經(jīng)加入到vg00中了。
#mkboot -l /dev/dsk/c3t6d0
#lifls -l /dev/rdsk/c3t5d0
#lifls -l /dev/rdsk/c3t6d0
  在c3t6d0上創(chuàng)建LIF,并對比兩塊硬盤的LIF信息一致性。
  
#for i in 1 2 3 4 5 6 7 8
>do
>lvextend -m 1 /dev/vg00/lvol$i /dev/dsk/c3t6d0
>done
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol1" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol2" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol3" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol4" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol5" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol6" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol7" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol8" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
#mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/c3t6d0
#lvlnboot -b /dev/vg00/lvol1
#lvlnboot -s /dev/vg00/lvol2
#lvlnboot -r /dev/vg00/lvol3
#lvlnboot -d /dev/vg00/lvol2
#setboot -p 10/0/15/1.6.0
#setboot -a 10/0/15/1.5.0   
  至此根盤的Mirror工作完成,經(jīng)過多次重新啟動,多次更改setboot引導(dǎo)順序后確認
Mirror沒有問題。
  接下來關(guān)機下電,拔掉c3t6d0這塊硬盤,啟動機器可看到報錯信息,仍能夠啟動系統(tǒng)。
登錄后vgdisplay也顯示報錯信息   
# vgdisplay
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c3t6d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255   
Cur LV                      8      
Open LV                     8      
Max PV                      16     
Cur PV                      2      
Act PV                      1      
Max PE per PV               4350         
VGDA                        2   
PE Size (Mbytes)            4               
Total PE                    4340   
Alloc PE                    3124   
Free PE                     1216   
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0
  由于已經(jīng)不存在c3t6d0硬盤或是這塊硬盤已經(jīng)故障不再有數(shù)據(jù)信息,這里就不能再使
用lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c3t6d0等命令來取消c3t6d0上的Mirror信息
了,這里HP提供一個pv_key方試來取消Mirror,具體每個LV的信息里包括了pv_key,可以
通過下面命令查看
# lvdisplay -kv /dev/vg00/lvol1
lvdisplay: Warning: couldn't query physical volume "/dev/dsk/c3t6d0":
The specified path does not correspond to physical volume attached to
this volume group
lvdisplay: Warning: couldn't query all of the physical volumes.
--- Logical volumes ---
LV Name                     /dev/vg00/lvol1
VG Name                     /dev/vg00
LV Permission               read/write   
LV Status                   available/stale           
Mirror copies               1            
Consistency Recovery        MWC                 
Schedule                    parallel     
LV Size (Mbytes)            300            
Current LE                  75        
Allocated PE                150         
Stripes                     0      
Stripe Size (Kbytes)        0                  
Bad block                   off         
Allocation                  strict/contiguous         
IO Timeout (Seconds)        default            
   --- Distribution of logical volume ---
   PV Name            LE on PV  PE on PV  
   /dev/dsk/c3t5d0    75        75        
   --- Logical extents ---
   LE    PV1                PE1   Status 1 PV2                PE2   Status 2
   00000      0             00000 stale         1             00000 current  
   00001      0             00001 stale         1             00001 current  
   00002      0             00002 stale         1             00002 current  
   00003      0             00003 stale         1             00003 current  
......   ......
  可以看到PV1的pv_key=0 而其PV的狀態(tài)已經(jīng)stale了,那么我們需要去掉這個PV在
VG00中的信息。下面這個命令增加了一個-k參數(shù),最后一個0表示PV1的pv_key,用它代替了
c3t6d0這塊硬盤。
# lvreduce -k -m 0 /dev/vg00/lvol1 0
Logical volume "/dev/vg00/lvol1" has been successfully reduced.
lvlnboot: Warning: couldn't query physical volume "/dev/dsk/c3t6d0":
The specified path does not correspond to physical volume attached to
this volume group
lvlnboot: Warning: couldn't query all of the physical volumes.
vgcfgbackup: Warning: couldn't query physical volume "/dev/dsk/c3t6d0":
The specified path does not correspond to physical volume attached to
this volume group
vgcfgbackup: Warning: couldn't query all of the physical volumes.
vgcfgbackup: Couldn't query physical volume "/dev/dsk/c3t6d0":
The specified path does not correspond to physical volume attached to
this volume group
vgcfgbackup: Couldn't query physical volume "/dev/dsk/c3t6d0":
The specified path does not correspond to physical volume attached to
this volume group                              
  將lvol1清理完成后再用lvdisplay看到如下正常信息。
  
# lvdisplay -kv /dev/vg00/lvol1|more
lvdisplay: Warning: couldn't query physical volume "/dev/dsk/c3t6d0":
The specified path does not correspond to physical volume attached to
this volume group
lvdisplay: Warning: couldn't query all of the physical volumes.
--- Logical volumes ---
LV Name                     /dev/vg00/lvol1
VG Name                     /dev/vg00
LV Permission               read/write   
LV Status                   available/syncd           
Mirror copies               0            
Consistency Recovery        MWC                 
Schedule                    parallel     
LV Size (Mbytes)            300            
Current LE                  75        
Allocated PE                75         
Stripes                     0      
Stripe Size (Kbytes)        0                  
Bad block                   off         
Allocation                  strict/contiguous         
IO Timeout (Seconds)        default            
   --- Distribution of logical volume ---
   PV Name            LE on PV  PE on PV  
   /dev/dsk/c3t5d0    75        75        
   --- Logical extents ---
   LE    PV1                PE1   Status 1
   00000      1             00000 current  
   00001      1             00001 current  
   00002      1             00002 current  
   00003      1             00003 current   
......   ......
  這里仍有報錯信息,這是由于c3t6d0仍在vg00這個卷組中有信息,后面再處理,現(xiàn)在先
在剩下的7個LV中用上面的pv_key的方法一一去掉c3t6d0的信息。完成后現(xiàn)在要將c3t6d0在vg00
里的信息刪掉,即從vg00中用vgreduce命令刪掉c3t6d0這個PV。
# vgreduce -f vg00
vgreduce: Couldn't query physical volume "/dev/dsk/c3t6d0":
The specified path does not correspond to physical volume attached to
this volume group
PV with key 0 sucessfully deleted from vg vg00
Repair done, please do the following steps.....:
1.  save /etc/lvmtab to another file
2.  remove /etc/lvmtab
3.  use vgscan(1m) -v to re-create /etc/lvmtab
4.  NOW use vgcfgbackup(1m) to save the LVM setup
  這里vgreduce命令給出了四個清理LVM文件的步驟,按這個步驟一一完成就行。
  
# cp /etc/lvmtab /etc/lvmtab.bck
# rm -f /etc/lvmtab
# vgscan -v
Creating "/etc/lvmtab".
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg00".
Physical Volume "/dev/dsk/c0t0d0" contains no LVM information
/dev/vg00
/dev/dsk/c3t5d0
Scan of Physical Volumes Complete.
#vgcfgbackup
#setboot -p 10/0/15/1.5.0
#setboot -a 10/0/15/1.5.0
  至此,全部完成了Mirror的清理工作,重新啟動系統(tǒng),vgdisplay,lvdisplay等命令已經(jīng)不再
有報錯信息了,完成了全部測試工作。
  總結(jié):
  在線清除故障根盤的Mirror信息步驟如下
  1、用下面的命令確認故障硬盤的pv_key
      lvdisplay -kv /dev/vg00/lvol1
      ......
      lvdisplay -kv /dev/vg00/lvol8
  2、用pv_key的方試去掉LV中的故障硬盤的Mirror信息
      for i in 1 2 3 4 5 6 7 8
      do
      lvreduce -k -m 0 /dev/vg00/lvol$i 0        --最后那個0是上面確認的pv_key的值
      done
  3、vgreduce -f /dev/vg00
  4、cp /etc/lvmtab /etc/lvmtab.bck
  5、rm -f /etc/lvmtab
  6、vgscan -v
  7、vgcfgbackup
  8、setboot -p


本文來自ChinaUnix博客,如果查看原文請點:http://blog.chinaunix.net/u/4005/showart_349599.html
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP