ITPub博客

首页 > Linux操作系统 > Linux操作系统 > HPUX MCSG LVM非在線擴容

HPUX MCSG LVM非在線擴容

原创 Linux操作系统 作者:chengxideng 时间:2012-02-02 10:41:16 0 删除 编辑

HPUX的FS如果是JFS的,那么該系統支持在線擴容,如果是其它FS,則不能在線擴容。HPUX MCSG在線擴容的文檔之前有記錄過,現在記錄下非在線擴容的步驟:

//創建PV
root@HPUX03:/ $pvcreate /dev/rdsk/c4t1d4
Physical volume "/dev/rdsk/c4t1d4" has been successfully created.

root@HPUX03:/ $pvcreate /dev/rdsk/c6t1d4
Physical volume "/dev/rdsk/c6t1d4" has been successfully created.

root@HPUX03:/ $pvcreate /dev/rdsk/c8t1d4
Physical volume "/dev/rdsk/c8t1d4" has been successfully created.

root@HPUX03:/ $pvcreate /dev/rdsk/c10t1d4
Physical volume "/dev/rdsk/c10t1d4" has been successfully created.

//擴展VG
root@HPUX03:/ $vgextend /dev/vgtprpt /dev/dsk/c4t1d4 dev/dsk/c6t1d4 /dev/dsk/c8t1d4 /dev/dsk/c10t1d4                              <
Current path "/dev/dsk/c6t0d7" is an alternate link, skip.
Current path "/dev/dsk/c6t1d0" is an alternate link, skip.
Current path "/dev/dsk/c8t0d7" is an alternate link, skip.
Current path "/dev/dsk/c8t1d0" is an alternate link, skip.
Current path "/dev/dsk/c10t0d7" is an alternate link, skip.
Current path "/dev/dsk/c10t1d0" is an alternate link, skip.
Current path "/dev/dsk/c8t1d2" is an alternate link, skip.
Current path "/dev/dsk/c6t1d2" is an alternate link, skip.
Current path "/dev/dsk/c4t1d2" is an alternate link, skip.
Volume group "/dev/vgtprpt" has been successfully extended.
Volume Group configuration for /dev/vgtprpt has been saved in /etc/lvmconf/vgtprpt.conf

//擴展LV
root@HPUX03:/ $lvextend -l 44788 /dev/vgtprpt/lvol1
Logical volume "/dev/vgtprpt/lvol1" has been successfully extended.
Volume Group configuration for /dev/vgtprpt has been saved in /etc/lvmconf/vgtprpt.conf

root@HPUX03:/ $lvdisplay /dev/vgtprpt/lvol1
--- Logical volumes ---
LV Name                     /dev/vgtprpt/lvol1
VG Name                     /dev/vgtprpt
LV Permission               read/write  
LV Status                   available/syncd          
Mirror copies               0           
Consistency Recovery        MWC                
Schedule                    parallel    
LV Size (Mbytes)            1433216        
Current LE                  44788    
Allocated PE                44788      
Stripes                     0      
Stripe Size (Kbytes)        0                  
Bad block                   on          
Allocation                  strict                   
IO Timeout (Seconds)        default     

//停掉package
root@HPUX03:/ $cmhaltpkg tprptpkg
Disabling  automatic failover for failover packages to be halted.
Halting package tprptpkg
Successfully halted package tprptpkg
One or more packages or package instances have been halted. These packages have AUTO_RUN disabled and no new instance can start automatically. To allow automatic start, enable AUTO_RUN via cmmodpkg -e
cmhaltpkg: Completed successfully on all packages specified
root@HPUX03:/ $cmviewcl

CLUSTER        STATUS      
E4TPCluster    up          
 
  NODE           STATUS       STATE       
  HPUX03       up           running     
  HPUX04       up           running     

    PACKAGE        STATUS        STATE         AUTO_RUN     NODE       
    tpmespkg       up            running       enabled      HPUX04   
   
UNOWNED_PACKAGES

    PACKAGE        STATUS        STATE         AUTO_RUN     NODE       
    tprptpkg       down          halted        disabled     unowned         

//把VG從集群管理改為本機管理
root@HPUX03:/ $vgchange -c n /dev/vgtprpt
Performed Configuration change.
Volume group "/dev/vgtprpt" has been successfully changed.

root@HPUX03:/ $vgchange -a y /dev/vgtprpt
Activated volume group
Volume group "/dev/vgtprpt" has been successfully changed.

//擴展filesystem
root@HPUX03:/ $extendfs /dev/vgtprpt/lvol1
extendfs: /etc/default/fs is used for determining the file system type

root@HPUX03:/ $bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    4194304  321296 3842800    8% /
/dev/vg00/lvol1    1835008  128984 1692792    7% /stand
/dev/vg00/lvol8    8912896 5829312 3063856   66% /var
/dev/vg00/lvol7    7913472 3077024 4798752   39% /usr
/dev/vg00/lvol4    2097152  771864 1315832   37% /tmp
/dev/vg00/lvol6    9125888 4562000 4528240   50% /opt
/dev/vg00/lvol5    1048576   19640 1020952    2% /home

//把VG從本機管理改為集群管理
root@HPUX03:/ $vgchange -a n /dev/vgtprpt
Volume group "/dev/vgtprpt" has been successfully changed.

root@HPUX03:/ $vgchange -a n /dev/vgmesarch
Volume group "/dev/vgmesarch" has been successfully changed.

root@HPUX03:/ $vgchange -c y /dev/vgtprpt
Performed Configuration change.
Volume group "/dev/vgtprpt" has been successfully changed.

root@HPUX03:/ $vgchange -c y /dev/vgmesarch
vgchange: Failed to set the specified attributes for volume group "/dev/vgmesarch".

//開啟package
root@HPUX03:/ $cmmodpkg -e tprptpkg
cmmodpkg: Completed successfully on all packages specified

root@HPUX03:/ $cmviewcl

CLUSTER        STATUS      
E4TPCluster    up          
 
  NODE           STATUS       STATE       
  HPUX03       up           running     

    PACKAGE        STATUS        STATE         AUTO_RUN     NODE       
    tprptpkg       starting      starting      enabled      HPUX03   
 
  NODE           STATUS       STATE       
  HPUX04       up           running     

    PACKAGE        STATUS        STATE         AUTO_RUN     NODE       
    tpmespkg       up            running       enabled      HPUX04   
   
root@HPUX03:/ $bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    4194304  321296 3842800    8% /
/dev/vg00/lvol1    1835008  128984 1692792    7% /stand
/dev/vg00/lvol8    8912896 5830336 3062800   66% /var
/dev/vg00/lvol7    7913472 3077024 4798752   39% /usr
/dev/vg00/lvol4    2097152  771864 1315832   37% /tmp
/dev/vg00/lvol6    9125888 4562000 4528240   50% /opt
/dev/vg00/lvol5    1048576   19640 1020952    2% /home
/dev/vgtprpt/lvol1 1467613184 1232052359 220838297   85% /tprpt
/dev/vgrptarch/lvol1
                   104824832 3976673 94545338    4% /rptarch
root@HPUX03:/ $strings /etc/lvmtab
/dev/vg00
/dev/dsk/c3t0d0s2
/dev/vgmesarch
/dev/dsk/c4t0d1
/dev/dsk/c4t0d2
/dev/dsk/c6t0d1
/dev/dsk/c6t0d2
/dev/dsk/c8t0d1
/dev/dsk/c8t0d2
/dev/dsk/c10t0d1
/dev/dsk/c10t0d2
/dev/vgrptarch
/dev/dsk/c4t0d5
/dev/dsk/c4t0d6
/dev/dsk/c6t0d5
/dev/dsk/c6t0d6
/dev/dsk/c8t0d5
/dev/dsk/c8t0d6
/dev/dsk/c10t0d5
/dev/dsk/c10t0d6
/dev/vgtprpt
/dev/dsk/c4t0d7
/dev/dsk/c4t1d0
/dev/dsk/c6t0d7
/dev/dsk/c6t1d0
/dev/dsk/c8t0d7
/dev/dsk/c8t1d0
/dev/dsk/c10t0d7
/dev/dsk/c10t1d0
/dev/dsk/c10t1d2
/dev/dsk/c8t1d2
/dev/dsk/c6t1d2
/dev/dsk/c4t1d2
/dev/dsk/c4t1d4
/dev/dsk/c6t1d4
/dev/dsk/c8t1d4
/dev/dsk/c10t1d4
/dev/vglock
/dev/dsk/c4t1d1
/dev/dsk/c6t1d1
/dev/dsk/c8t1d1
/dev/dsk/c10t1d1
/dev/vgtpmes
/dev/dsk/c4t0d3
/dev/dsk/c4t0d4
/dev/dsk/c4t1d3
/dev/dsk/c6t0d3
/dev/dsk/c6t0d4
/dev/dsk/c6t1d3
/dev/dsk/c8t0d3
/dev/dsk/c8t0d4
/dev/dsk/c8t1d3
/dev/dsk/c10t0d3
/dev/dsk/c10t0d4
/dev/dsk/c10t1d3

//導出LVM配置文件,拷貝到其它節點
root@HPUX03:/ $cd /tmp
root@HPUX03:/tmp $vgexport -v -p -s -m /tmp/vgtprpt.map /dev/vgtprpt
Beginning the export process on Volume Group "/dev/vgtprpt".
vgexport: Volume group "/dev/vgtprpt" is still active.
/dev/dsk/c4t0d7
/dev/dsk/c4t1d0
/dev/dsk/c6t0d7
/dev/dsk/c6t1d0
/dev/dsk/c8t0d7
/dev/dsk/c8t1d0
/dev/dsk/c10t0d7
/dev/dsk/c10t1d0
/dev/dsk/c10t1d2
/dev/dsk/c8t1d2
/dev/dsk/c6t1d2
/dev/dsk/c4t1d2
/dev/dsk/c4t1d4
/dev/dsk/c6t1d4
/dev/dsk/c8t1d4
/dev/dsk/c10t1d4
root@HPUX03:/tmp $scp vgtprpt.map HPUX04:/tmp
Password:
vgtprpt.map                                                    100%   30     0.0KB/s   00:00   
root@HPUX03:/tmp $

---------------------------------------------在其他node上導入LVM配置文件--------------------------------------
略...

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

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

注册时间:2011-02-18

  • 博文量
    19
  • 访问量
    11354