Chinaunix首页 | 论坛 | 博客
  • 博客访问: 268063
  • 博文数量: 107
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 74
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-18 09:57
文章分类

全部博文(107)

文章存档

2023年(2)

2021年(1)

2017年(1)

2015年(4)

2014年(9)

2013年(4)

2012年(14)

2011年(49)

2010年(23)

分类:

2011-01-12 11:30:59

下面这段操作的目标是为/dev/vg00/lvol1建立mirror,如果主磁盘损坏,可以确保处于这块硬盘上的
lvol1数据不丢失。
 
 
# vgdisplay -v
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write    
VG Status                   available                
Max LV                      255   
Cur LV                      9     
Open LV                     9     
Max PV                      16    
Cur PV                      2     
Act PV                      2     
Max PE per PV               4384        
VGDA                        4  
PE Size (Mbytes)            16             
Total PE                    8759   
Alloc PE                    2278   
Free PE                     6481   
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    
VG Version                  1.0.0    
   --- Logical volumes ---
   LV Name                     /dev/vg00/lvol1
   LV Status                   available/syncd          
   LV Size (Mbytes)            1792           
   Current LE                  112      
   Allocated PE                112        
   Used PV                     1      
   LV Name                     /dev/vg00/lvol2
   LV Status                   available/syncd          
   LV Size (Mbytes)            8192           
   Current LE                  512      
   Allocated PE                512        
   Used PV                     1      
   LV Name                     /dev/vg00/lvol3
   LV Status                   available/syncd          
   LV Size (Mbytes)            1024           
   Current LE                  64       
   Allocated PE                64         
   Used PV                     1      
   LV Name                     /dev/vg00/lvol4
   LV Status                   available/syncd          
   LV Size (Mbytes)            512            
   Current LE                  32       
   Allocated PE                32         
   Used PV                     1      
   LV Name                     /dev/vg00/lvol5
   LV Status                   available/syncd          
   LV Size (Mbytes)            112            
   Current LE                  7        
   Allocated PE                7          
   Used PV                     1      
   LV Name                     /dev/vg00/lvol6
   LV Status                   available/syncd          
   LV Size (Mbytes)            4960           
   Current LE                  310      
   Allocated PE                310        
   Used PV                     1      
   LV Name                     /dev/vg00/lvol7
   LV Status                   available/syncd          
   LV Size (Mbytes)            2960           
   Current LE                  185      
   Allocated PE                185        
   Used PV                     1      
   LV Name                     /dev/vg00/lvol8
   LV Status                   available/syncd          
   LV Size (Mbytes)            8704           
   Current LE                  544      
   Allocated PE                544        
   Used PV                     1      
   LV Name                     /dev/vg00/myswap
   LV Status                   available/syncd          
   LV Size (Mbytes)            8192           
   Current LE                  512      
   Allocated PE                512        
   Used PV                     1      

   --- Physical volumes ---
   PV Name                     /dev/disk/disk2
   PV Status                   available               
   Total PE                    4375   
   Free PE                     2097   
   Autoswitch                  On       
   Proactive Polling           On              
   PV Name                     /dev/dsk/c2t0d0
   PV Status                   available               
   Total PE                    4384   
   Free PE                     4384   
   Autoswitch                  On       
   Proactive Polling           On              

#                         
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t0d0
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.
lvlnboot: LIF information corrupt or not present on  "/dev/dsk/c2t0d0".
Use the "mkboot" command to initialize the LIF area.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvdisplay /dev/vg00/lvol1
--- Logical volumes ---
LV Name                     /dev/vg00/lvol1
VG Name                     /dev/vg00
LV Permission               read/write  
LV Status                   available/syncd          
Mirror copies               1           
Consistency Recovery        MWC                
Schedule                    parallel     
LV Size (Mbytes)            1792           
Current LE                  112      
Allocated PE                224
        
Stripes                     0      
Stripe Size (Kbytes)        0                  
Bad block                   off         
Allocation                  strict/contiguous        
IO Timeout (Seconds)        default            
#
因为生成备份时,如下所示,并不生成lvm头信息备份,主磁盘坏盘后需要手动创建vg00,并将这块盘导入。
 
导入过程尚未测试。
 
 
 
 
 
 
 
阅读(1433) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2011-03-09 09:19:27

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com