HPUX下lv調整-lv擴容和檔案系統擴容

super_sky發表於2014-02-11

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章