ITPub博客

首页 > Linux操作系统 > Linux操作系统 > HPUX下lv调整-lv扩容和文件系统扩容

HPUX下lv调整-lv扩容和文件系统扩容

原创 Linux操作系统 作者:super_sky 时间:2014-02-11 10:00:09 0 删除 编辑

tempapp@root[#/]uname -a
HP-UX tempapp B.11.31 U 9000/800 970419909 unlimited-user license

tempapp@root[#/tmp]bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3     212992  160632   52024   76% /
/dev/vg00/lvol1    1776056   92112 1506336    6% /stand
/dev/vg00/lvol8    8912896  913896 7938032   10% /var
/dev/vg00/lvol7    4325376 2110792 2197416   49% /usr
/dev/vg00/lvol4    2097152   21440 2060144    1% /tmp
/dev/vg00/oracle   10485760   20062 9811599    0% /oracle
/dev/vg00/lvol6    5734400 3771184 1947992   66% /opt
/dev/vg00/lvol5     114688    5480  108360    5% /home

我需要在这台机器上安装多个版本的数据库软件,所以有几个文件系统肯定不满足需要了,需要做调整
1)将/tmp扩展到5G
tempapp@root[#/opt]lvextend -L 5120M /dev/vg00/lvol4
Logical volume "/dev/vg00/lvol4" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

tempapp@root[#/opt]fsadm -b 5120M /tmp
fsadm: /etc/default/fs is used for determining the file system type
UX:vxfs fsadm: INFO: V-3-25942: /dev/vg00/rlvol4 size increased from 2097152 sectors to 5242880 sectors

tempapp@root[#/opt]bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3     212992  161960   50704   76% /
/dev/vg00/lvol1    1776056   92112 1506336    6% /stand
/dev/vg00/lvol8    2097152  913768 1175664   44% /var
/dev/vg00/lvol7    4325376 2110792 2197416   49% /usr
/dev/vg00/lvol4    5242880   21536 5181200    0% /tmp
/dev/vg00/oracle   10485760   20062 9811599    0% /oracle
/dev/vg00/lvol6    5734400 3771184 1947992   66% /opt
/dev/vg00/lvol5     114688    5480  108360    5% /home

2)将/home扩展到10G
tempapp@root[#/opt]lvextend -L 10240M /dev/vg00/lvol5
Logical volume "/dev/vg00/lvol5" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
tempapp@root[#/opt]
tempapp@root[#/opt]fsadm -b 10240M /home
fsadm: /etc/default/fs is used for determining the file system type
UX:vxfs fsadm: INFO: V-3-25942: /dev/vg00/rlvol5 size increased from 114688 sectors to 10485760 sectors
tempapp@root[#/opt]
tempapp@root[#/opt]bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3     212992  161960   50704   76% /
/dev/vg00/lvol1    1776056   92112 1506336    6% /stand
/dev/vg00/lvol8    2097152  913768 1175664   44% /var
/dev/vg00/lvol7    4325376 2110792 2197416   49% /usr
/dev/vg00/lvol4    5242880   21536 5181200    0% /tmp
/dev/vg00/oracle   10485760   20062 9811599    0% /oracle
/dev/vg00/lvol6    5734400 3771184 1947992   66% /opt
/dev/vg00/lvol5    10485760    5792 10398096    0% /home

检查vg是否还有空闲空间

tempapp@root[#/tmp]vgdisplay -v /dev/vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write    
VG Status                   available                
Max LV                      255   
Cur LV                      10    
Open LV                     10    
Max PV                      16    
Cur PV                      2     
Act PV                      2     
Max PE per PV               4385        
VGDA                        4  
PE Size (Mbytes)            16             
Total PE                    8750   
Alloc PE                    4500   
Free PE                     4250   
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    
VG Version                  1.0      
VG Max Size                 1122560m  
VG Max Extents              70160        

   --- Logical volumes ---
   LV Name                     /dev/vg00/lvol1
   LV Status                   available/syncd          
   LV Size (Mbytes)            1792           
   Current LE                  112      
   Allocated PE                224        
   Used PV                     2      

   LV Name                     /dev/vg00/lvol2
   LV Status                   available/syncd          
   LV Size (Mbytes)            8192           
   Current LE                  512      
   Allocated PE                1024       
   Used PV                     2      

   LV Name                     /dev/vg00/lvol3
   LV Status                   available/syncd          
   LV Size (Mbytes)            208            
   Current LE                  13       
   Allocated PE                26         
   Used PV                     2      

   LV Name                     /dev/vg00/lvol4
   LV Status                   available/syncd          
   LV Size (Mbytes)            2048           
   Current LE                  128      
   Allocated PE                256        
   Used PV                     2      

   LV Name                     /dev/vg00/lvol5
   LV Status                   available/syncd          
   LV Size (Mbytes)            112            
   Current LE                  7        
   Allocated PE                14         
   Used PV                     2      

   LV Name                     /dev/vg00/lvol6
   LV Status                   available/syncd          
   LV Size (Mbytes)            5600           
   Current LE                  350      
   Allocated PE                700        
   Used PV                     2      

   LV Name                     /dev/vg00/lvol7
   LV Status                   available/syncd          
   LV Size (Mbytes)            4224           
   Current LE                  264      
   Allocated PE                528        
   Used PV                     2      

   LV Name                     /dev/vg00/lvol8
   LV Status                   available/syncd          
   LV Size (Mbytes)            8704           
   Current LE                  544      
   Allocated PE                1088       
   Used PV                     2      

   LV Name                     /dev/vg00/lvswap
   LV Status                   available/syncd          
   LV Size (Mbytes)            0              
   Current LE                  0        
   Allocated PE                0          
   Used PV                     0      

   LV Name                     /dev/vg00/oracle
   LV Status                   available/syncd          
   LV Size (Mbytes)            10240          
   Current LE                  640      
   Allocated PE                640        
   Used PV                     1      

   --- Physical volumes ---
   PV Name                     /dev/disk/disk20
   PV Status                   available               
   Total PE                    4375   
   Free PE                     1805   
   Autoswitch                  On       
   Proactive Polling           On              

   PV Name                     /dev/disk/disk18
   PV Status                   available               
   Total PE                    4375   
   Free PE                     2445   
   Autoswitch                  On       
   Proactive Polling           On              

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11590946/viewspace-1079307/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-01-11

  • 博文量
    77
  • 访问量
    757615