Chinaunix

标题: PVG 解mirror问题 [打印本页]

作者: caofree    时间: 2009-06-30 22:32
标题: PVG 解mirror问题
--- Volume groups ---
VG Name                     /dev/vgdb1
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255   
Cur LV                      12     
Open LV                     12     
Max PV                      16     
Cur PV                      10     
Act PV                      10     
Max PE per PV               8683         
VGDA                        20  
PE Size (Mbytes)            4               
Total PE                    47741   
Alloc PE                    28000   
Free PE                     19741   
Total PVG                   2        
Total Spare PVs             0              
Total Spare PVs in use      0                     

   --- Logical volumes ---
   LV Name                     /dev/vgdb1/rootdbs1
   LV Status                   available/syncd           
   LV Size (Mbytes)            2000            
   Current LE                  500      
   Allocated PE                1000        
   Used PV                     10      

   LV Name                     /dev/vgdb1/userdbs1
   LV Status                   available/syncd           
   LV Size (Mbytes)            2000            
   Current LE                  500      
   Allocated PE                1000        
   Used PV                     10      

   LV Name                     /dev/vgdb1/userdbs2
   LV Status                   available/syncd           
   LV Size (Mbytes)            2000            
   Current LE                  500      
   Allocated PE                1000        
   Used PV                     10      

   LV Name                     /dev/vgdb1/userdbs3
   LV Status                   available/syncd           
   LV Size (Mbytes)            2000            
   Current LE                  500      
   Allocated PE                1000        
   Used PV                     10      

   LV Name                     /dev/vgdb1/userdbs4
   LV Status                   available/syncd           
   LV Size (Mbytes)            2000            
   Current LE                  500      
   Allocated PE                1000        
   Used PV                     10      

   LV Name                     /dev/vgdb1/userdbs5
   LV Status                   available/syncd           
   LV Size (Mbytes)            2000            
   Current LE                  500      
   Allocated PE                1000        
   Used PV                     10      

   LV Name                     /dev/vgdb1/tempdbs1
   LV Status                   available/syncd           
   LV Size (Mbytes)            2000            
   Current LE                  500      
   Allocated PE                1000        
   Used PV                     10      

   LV Name                     /dev/vgdb1/phydbs1
   LV Status                   available/syncd           
   LV Size (Mbytes)            2000            
   Current LE                  500      
   Allocated PE                1000        
   Used PV                     10      

   LV Name                     /dev/vgdb1/logdbs1
   LV Status                   available/syncd           
   LV Size (Mbytes)            2000            
   Current LE                  500      
   Allocated PE                1000        
   Used PV                     10      

   LV Name                     /dev/vgdb1/tmpe
   LV Status                   available/syncd           
   LV Size (Mbytes)            8000            
   Current LE                  2000      
   Allocated PE                4000        
   Used PV                     10      

   LV Name                     /dev/vgdb1/userdbs6
   LV Status                   available/stale           
   LV Size (Mbytes)            20000           
   Current LE                  5000      
   Allocated PE                10000      
   Used PV                     10      

   LV Name                     /dev/vgdb1/backup
   LV Status                   available/syncd           
   LV Size (Mbytes)            20000           
   Current LE                  5000      
   Allocated PE                5000        
   Used PV                     5      


   --- Physical volumes ---
   PV Name                     /dev/dsk/c5t8d0
   PV Status                   available               
   Total PE                    4340   
   Free PE                     1040   
   Autoswitch                  On        

   PV Name                     /dev/dsk/c5t9d0
   PV Status                   available               
   Total PE                    8681   
   Free PE                     5381   
   Autoswitch                  On        

   PV Name                     /dev/dsk/c5t10d0
   PV Status                   available               
   Total PE                    4340   
   Free PE                     1040   
   Autoswitch                  On        

   PV Name                     /dev/dsk/c5t11d0
   PV Status                   available               
   Total PE                    4340   
   Free PE                     1040   
   Autoswitch                  On        

   PV Name                     /dev/dsk/c7t8d0
   PV Status                   available               
   Total PE                    4340   
   Free PE                     2040   
   Autoswitch                  On        

   PV Name                     /dev/dsk/c7t9d0
   PV Status                   available               
   Total PE                    4340   
   Free PE                     2040   
   Autoswitch                  On        

   PV Name                     /dev/dsk/c7t10d0
   PV Status                   available               
   Total PE                    4340   
   Free PE                     2040   
   Autoswitch                  On        

   PV Name                     /dev/dsk/c7t11d0
   PV Status                   available               
   Total PE                    4340   
   Free PE                     2040   
   Autoswitch                  On        

   PV Name                     /dev/dsk/c5t12d0
   PV Status                   available               
   Total PE                    4340   
   Free PE                     1040   
   Autoswitch                  On        

   PV Name                     /dev/dsk/c7t12d0
   PV Status                   available               
   Total PE                    4340   
   Free PE                     2040   
   Autoswitch                  On        


   --- Physical volume groups ---
   PVG Name                    PVG1                       
   PV Name                     /dev/dsk/c5t8d0            
   PV Name                     /dev/dsk/c5t9d0            
   PV Name                     /dev/dsk/c5t10d0           
   PV Name                     /dev/dsk/c5t11d0           
   PV Name                     /dev/dsk/c5t12d0           

   PVG Name                    PVG2                       
   PV Name                     /dev/dsk/c7t8d0            
   PV Name                     /dev/dsk/c7t9d0            
   PV Name                     /dev/dsk/c7t10d0           
   PV Name                     /dev/dsk/c7t11d0           
   PV Name                     /dev/dsk/c7t12d0   

smp1@root>lvdisplay -v /dev/vgdb1/userdbs6|grep stale
LV Status                   available/stale           
   00021 /dev/dsk/c5t9d0    01304 current  /dev/dsk/c7t9d0    01304 stale   
现在需要更换硬盘但不知道怎么拆PVG镜像  请问怎样解pVG的镜像啊,还有c7t9d0上有pe报stale,而dd测试的是c5t9d0报io错误,请问我该如何处理呢。,希望高手赐

[ 本帖最后由 caofree 于 2009-7-4 16:15 编辑 ]
作者: caofree    时间: 2009-06-30 23:10
有哪位兄弟知道怎么做啊
作者: tianxiay2ren    时间: 2009-07-01 08:00
没明白,是要拆pvg的镜像吗?

是的话,就
lvreduce -m 0 /dev/vgdb1/userdbs6 /dev/dsk/c7t8d0 /dev/dsk/c7t9d0 /dev/dsk/c7t10d0  /dev/dsk/c7t11d0  /dev/dsk/c7t12d0

就是把镜像pvg的所有硬盘删掉就行了
作者: Oliver200x    时间: 2009-07-01 17:13
拆掉镜像后,顺序会变
作者: gcgsuper    时间: 2009-07-01 18:35
If you like to remove the mirror again, you need to use lvreduce:
# lvreduce -m 0 /dev/vg00/lvolX /dev/dsk/c1t6d0
Of course, this can be also done automatically using a shell loop, e.g.:
# for lvol in lvol8 lvol7 ... lvol1 (specify all LVs you need  to reduce)
>do
> lvreduce -m 0 /dev/vg00/$lvol /dev/dsk/c1t6d0
> done
作者: amirwap    时间: 2009-07-02 23:37
smp1@root>lvdisplay -v /dev/vgdb1/userdbs6|grep stale
LV Status                   available/stale           
   00021 /dev/dsk/c5t9d0    01304 current  /dev/dsk/c7t9d0    01304 stale   
楼主你这个stale怎么解决?
好象出现stale表示有坏块哦!
作者: caofree    时间: 2009-07-04 16:06
目前 还不知道怎么处理那个stale, 在event日志里报告的是c5t9d0有问题,但vgdisplay看到是c7t9d0有stale,该怎么处理呢

[ 本帖最后由 caofree 于 2009-7-5 00:29 编辑 ]
作者: wuzi1006    时间: 2009-07-16 10:15
lvdisplay -v看下到底有多少盘有坏块,你的阵列是什么。我做过一次。直接换盘,系统会自动同步的




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2