AIX卷组下文件系统在线扩容

 一台AIX小机因生产需要对/sapdata目录进行扩容,由原来的90G扩容到210G,增加120G的空间.AIX小机后端通过光纤交换机连的EMC存储。首先在EMC存储上把空闲的硬盘做RAID,划分LUN,映射到生产AIX小机。

 EMC划完LUN映射完后,在AIX小机上执行cfgmgr ,然后lspv看是否认到新扩容的硬盘.
# cfgmgr  -i  disk
# lspv
hdisk0          00c6abdfc094f4e8                    rootvg          active
hdisk1          00c6abcfc4edbd87                    rootvg          active
hdisk6                                                           oravg           active
hdisk7                                                           oravg           active

注意HDISK后的16位数字,如果没有请执行
#chdev –l  hdisk6 –a  pv=yes (以使物理卷为LVM所用)。
#chdev –l  hdisk7 –a  pv=yes (以使物理卷为LVM所用)。

#lspv
hdisk0          00c6abdfc094f4e8                    rootvg          active
hdisk1          00c6abcfc4edbd87                    rootvg          active
hdisk6          00c6abcf1d17f7bf                     oravg           active
hdisk7          00c6abcf1d189c64                    oravg           active

(如果是HA架构,在A节点上识别到后执行#rmdev –Rd1 hdisk6然后在B节点上cfgmgr扫再认)--检查两节点LSPV是否一致和HDISK是否一致。

原文件目录大小
#df -g
/dev/sapdata    90.00    84.80   94%       26     1% /oracle/sapdata

然后执行smitty hacmp--- System Management (C-SPOC)-- HACMP Logical Volume Management--- Shared Volume Groups-- Set Characteristics of a Shared Volume Group-- Add a Volume to a Shared Volume Group--选择需要扩容的VG--回车,然后选择添加的硬盘---确定。然后进行扩容文件系统。#smitty chfs—change/show charactertistics of an enhanced journaled file system—选择要扩的文件系统—然后回车继续.

如果文件系统扩容出错,一般是文件系统的Block size或卷的LV原大小限制了最大扩容空间,可以# smitty hacmp--- System Management (C-SPOC)-- HACMP Logical Volume Management--- Shared file systems---enhanced journaled file systems---change/show characteristics of a shared enhanced journaled file system—选择文件系统来修改块大小,之后就可以成功扩文件系统。注:修改LV的大小,可以通过#smitty chlv来进行。

原参数:
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
  
                                                    [Entry Fields]
  File system name                                    /oracle/sapdata
  NEW mount point                                    [/oracle/sapdata]
  SIZE of file system
          Unit Size                                      512bytes                               +
          Number of units                           [188743680]                         #
  Mount GROUP                                        []
  Mount AUTOMATICALLY at system restart?              no                +
  PERMISSIONS                                         read/write                       +
  Mount OPTIONS                                      []                                     +
  Start Disk Accounting?                              no                                     +
  Block Size (bytes)                                  256
  Inline Log?                                               no
  Inline Log size (MBytes)                           [0]                                     #
  Extended Attribute Format                          [v1]
  Enable Quota Management?                            no                               +
  Allow Small Inode Extents?                          no                                  +          

现参数:
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
  
                                                    [Entry Fields]
  File system name                                    /oracle/sapdata
  NEW mount point                                    [/oracle/sapdata]
  SIZE of file system
          Unit Size                                   512bytes                             +
          Number of units                         [440401920]                      #
  Mount GROUP                                        []
  Mount AUTOMATICALLY at system restart?              no                        +
  PERMISSIONS                                         read/write                               +
  Mount OPTIONS                                      []                                            +
  Start Disk Accounting?                              no                                            +
  Block Size (bytes)                                  2048
  Inline Log?                                         no
  Inline Log size (MBytes)                           [0]                                          #
  Extended Attribute Format                          [v1]
  Enable Quota Management?                            no                                     +
  Allow Small Inode Extents?                        no                                +            

然后再扩,就正常了出现如下提示Filesystem size changed to 440401920  
注:扩容后包含已有空间的容量
验证一下
#df -g
/dev/sapdata    210.00    84.80   40%       26     1% /oracle/sapdata

本文出自 “滴水穿石孙杰” 博客,转载请与作者联系!

你可能感兴趣的:(文件系统,卷组,在线扩容,Aix5.3)