免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2795 | 回复: 0
打印 上一主题 下一主题

创建vg时需要注意的一个地方:指定max_pe(-e)的数量及pe_size(-s) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-01 17:19 |只看该作者 |倒序浏览
1.创建80G的pv
# mkdir /dev/vgken1
# mknod /dev/vgken1/group c 64 0x010000
# vgcreate /dev/vgken1 /dev/dsk/c5t0d0 /dev/dsk/c7t0d0
Increased the number of physical extents per physical volume to 20479.
Volume group "/dev/vgken1" has been successfully created.
Volume Group configuration for /dev/vgken1 has been saved in /etc/lvmconf/vgken1.conf
# vgdisplay -v vgken1
--- Volume groups ---
VG Name                     /dev/vgken1
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255   
Cur LV                      1      
Open LV                     1      
Max PV                      16     
Cur PV                      1      
Act PV                      1      
Max PE per PV               20479        
VGDA                        2   
PE Size (Mbytes)            4               
Total PE                    20476   
Alloc PE                    20475   
Free PE                     1      
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0                     
   --- Logical volumes ---
   LV Name                     /dev/vgken1/lvol2
   LV Status                   available/syncd           
   LV Size (Mbytes)            81900           
   Current LE                  20475     
   Allocated PE                20475      
   Used PV                     1      
   --- Physical volumes ---
   PV Name                     /dev/dsk/c5t0d0
   PV Name                     /dev/dsk/c7t0d0  Alternate Link
   PV Status                   available               
   Total PE                    20476   
   Free PE                     1      
   Autoswitch                  On   
二.添加100G的PV到vgken1下面
# vgextend /dev/vgken1 /dev/dsk/c5t0d1 /dev/dsk/c7t0d1
vgextend: Warning: Max_PE_per_PV for the volume group (20479) too small for this PV (25599).
         Using only 20479 PEs from this physical volume.
Current path "/dev/dsk/c7t0d0" is an alternate link, skip.
Volume group "/dev/vgken1" has been successfully extended.
Volume Group configuration for /dev/vgken1 has been saved in /etc/lvmconf/vgken1.conf
# diskinfo /dev/dsk/c5t0d1
diskinfo: Character device required
# diskinfo /dev/rdsk/c5t0d1
SCSI describe of /dev/rdsk/c5t0d1:
             vendor: HP      
         product id: HSV100         
               type: direct access
               size: 104857600 Kbytes
   bytes per sector: 512
# vgdisplay -v vgken1
--- Volume groups ---
VG Name                     /dev/vgken1
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255   
Cur LV                      1      
Open LV                     1      
Max PV                      16     
Cur PV                      2      
Act PV                      2      
Max PE per PV               20479        
VGDA                        4   
PE Size (Mbytes)            4               
Total PE                    40955   
Alloc PE                    20475   
Free PE                     20480   
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0                     
   --- Logical volumes ---
   LV Name                     /dev/vgken1/lvol2
   LV Status                   available/syncd           
   LV Size (Mbytes)            81900           
   Current LE                  20475     
   Allocated PE                20475      
   Used PV                     1      
   --- Physical volumes ---
   PV Name                     /dev/dsk/c5t0d0
   PV Name                     /dev/dsk/c7t0d0  Alternate Link
   PV Status                   available               
   Total PE                    20476   
   Free PE                     1      
   Autoswitch                  On        
   PV Name                     /dev/dsk/c5t0d1
   PV Name                     /dev/dsk/c7t0d1  Alternate Link
   PV Status                   available               
   Total PE                    20479   
   Free PE                     20479   
   Autoswitch                  On
划分一个100G的PV ,由于Max PE per PV及PE Size (Mbytes)的限制使100G的容量只能够使用80G!!
3.在创建VG的过程中应该注意指定max_pe(-e)的数量及pe_size(-s)的大小,否则可能会限制pv的使用!
# vgcreate -s 32 -e 65535 /dev/vgken1 /dev/dsk/c5t0d0 /dev/dsk/c7t0d0
Volume group "/dev/vgken1" has been successfully created.
Volume Group configuration for /dev/vgken1 has been saved in /etc/lvmconf/vgken1.conf
# vgdisplay -v vgken1
--- Volume groups ---
VG Name                     /dev/vgken1
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255   
Cur LV                      0      
Open LV                     0      
Max PV                      16     
Cur PV                      2      
Act PV                      2      
Max PE per PV               65535        
VGDA                        4   
PE Size (Mbytes)            32              
Total PE                    5758   
Alloc PE                    0      
Free PE                     5758   
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0                     
   --- Physical volumes ---
   PV Name                     /dev/dsk/c5t0d0
   PV Name                     /dev/dsk/c7t0d0  Alternate Link
   PV Status                   available               
   Total PE                    2559   
   Free PE                     2559   
   Autoswitch                  On        
   PV Name                     /dev/dsk/c5t0d1
   PV Name                     /dev/dsk/c7t0d1  Alternate Link
   PV Status                   available               
   Total PE                    3199   
   Free PE                     3199   
   Autoswitch                  On  



      

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/10757/showart_149219.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP