AIX逻辑卷扩容

aix的文件系统扩容是非常灵活的,如果不涉及加硬盘的硬件操作,只要通过aix里面的命令或者smitty菜单就行了,当然做好数据备份在任何情况下都是必要的。
1. 查看个逻辑卷大小
# df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           5.00      4.90    3%     7024     1% /
/dev/hd2          20.00     14.77   27%    57946     2% /usr
/dev/hd9var       10.00      9.37    7%     7454     1% /var
/dev/hd3          15.00     14.41    4%     3290     1% /tmp
/dev/hd1           6.00      5.01   17%     1873     1% /home
/proc                 -         -    -         -     -  /proc
/dev/hd10opt      15.00     14.62    3%    10242     1% /opt
/dev/lv00          0.25      0.24    4%       18     1% /var/adm/csd
/dev/fslv00       10.00      9.20    8%     2876     1% /sapmnt/BWP
/dev/lv_oracle      0.50      0.50    1%       47     1% /oracle
/dev/BWP           5.00      4.55    9%    12334     2% /oracle/BWP
/dev/BWP_102_64      9.00      4.84   47%    22062     2% /oracle/BWP/102_64
/dev/BWP_mirrlogA      0.50      0.40   20%        6     1% /oracle/BWP/mirrlogA
/dev/BWP_mirrlogB      0.50      0.40   20%        6     1% /oracle/BWP/mirrlogB
/dev/BWP_oraarch     50.00     38.82    93%      279     1% /oracle/BWP/oraarch
/dev/BWP_origlogA      0.50      0.36   29%        9     1% /oracle/BWP/origlogA
2、查看当前活动的卷。
# lsvg -o  /  #lsvg
oravg
rootvg
进一步详细查看ORAVG卷的详细信息
# lsvg -l oravg
oravg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
lv_oracle           jfs2       2       2       1    open/syncd    /oracle
client              jfs2       2       2       1    open/syncd    /oracle/client
stage_102_64        jfs2       28      28      1    open/syncd    /oracle/stage/102_64
BWP                 jfs2       20      20      1    open/syncd    /oracle/BWP
BWP_102_64          jfs2       36      36      1    open/syncd    /oracle/BWP/102_64
BWP_origlogA        jfs2       2       2       1    open/syncd    /oracle/BWP/origlogA
BWP_origlogB        jfs2       2       2       1    open/syncd    /oracle/BWP/origlogB
BWP_mirrlogA        jfs2       2       2       1    open/syncd    /oracle/BWP/mirrlogA
BWP_mirrlogB        jfs2       2       2       1    open/syncd    /oracle/BWP/mirrlogB
BWP_oraarch         jfs2       200     200     1    open/syncd    /oracle/BWP/oraarch
发现当前目录的PPS大小为200 3. 查看的整体详细细节 # lsvg oravg

VOLUME GROUP:       oravg                    VG IDENTIFIER:  00c6abcf00004c000000012d038039cb
VG STATE:           active                   PP SIZE:        256 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      7191 (1840896 megabytes)
MAX LVs:            512                      FREE PPs:       2589 (582912 megabytes)
LVs:                18                       USED PPs:       4602 (1257984 megabytes)
OPEN LVs:           18                       QUORUM:         5 (Enabled)
TOTAL PVs:          9                        VG DESCRIPTORS: 9
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         9                        AUTO ON:        no
MAX PPs per VG:     130048                                    
MAX PPs per PV:     1016                     MAX PVs:        128
LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable 
查看oravg卷组信息可知每个PPS大小为256M,目前oravg还剩2589个PPS,共计662784M;

4. 扩展文件系统的空间
  
使用命令 # chfs -a size=+78G /oracle/BWP/oraarch
#意思是给/oracle/BWP/oraarch增加78G的空间(注意G是大写)
执行完再lsvg 发现free pp size 没有增加,但是用smitty chfs 来做的时候
发现,增加的 size 在/oracle/BWP/oraarch上已经体现了。
-------下面可选,我所使用AIX使用chfs就可以扩容成功。

5. 使用smitty chfs来扩容的过程:
#smitty chfs

回车后选择这一项Change/Show Characteristics of an Enhanced Journaled File System,然后在目录列表里找到需要扩容的目录按回车。
Type or select values in entry fields. 
Press Enter AFTER making all desired changes.
   
                                                    [Entry Fields]
  File system name                                    /oracle/BWP/oraarch
  NEW mount point                                    [/oracle/BWP/oraarch]
  SIZE of file system
          Unit Size                                   Megabytes                                  +
          Number of units                            [79872]                                     #
  Mount GROUP                                        []
  Mount AUTOMATICALLY at system restart?              no                                         +
  PERMISSIONS                                         read/write                                 +
  Mount OPTIONS                                      []                                          +
  Start Disk Accounting?                              no                                         +
  Block Size (bytes)                                  4096
  Inline Log?                                         no
  Inline Log size (MBytes)                           [0]                                          #
  Extended Attribute Format                          [v1]
  Enable Quota Management?                            no                                         +
  Allow Small Inode Extents?                          no                                         +
             
             
we will see result:
                                           COMMAND STATUS
Command: OK            stdout: yes           stderr: no
Before command completion, additional instructions may appear below.
Filesystem size changed to 131072   #扩容后包含已有空间的容量
6. 再检查一下看新增上没有
# df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           5.00      4.90    3%     7024     1% /
/dev/hd2          20.00     14.77   27%    57935     2% /usr
/dev/hd9var       10.00      9.37    7%     7454     1% /var
/dev/hd3          15.00     14.41    4%     3381     1% /tmp
/dev/hd1           6.00      5.01   17%     1873     1% /home
/proc                 -         -    -         -     -  /proc
/dev/hd10opt      15.00     14.62    3%    10242     1% /opt
/dev/lv00          0.25      0.24    4%       18     1% /var/adm/csd
/dev/fslv00       10.00      9.20    8%     2876     1% /sapmnt/BWP
/dev/lv_oracle      0.50      0.50    1%       47     1% /oracle
/dev/BWP           5.00      4.55   10%    12348     2% /oracle/BWP
/dev/BWP_102_64      9.00      4.84   47%    22069     2% /oracle/BWP/102_64
/dev/BWP_mirrlogA      0.50      0.40   20%        6     1% /oracle/BWP/mirrlogA
/dev/BWP_mirrlogB      0.50      0.40   20%        6     1% /oracle/BWP/mirrlogB
/dev/BWP_oraarch    128.00     99.82   23%      663     1% /oracle/BWP/oraarch
扩容成功。
上一篇:4. K线基础知识


下一篇:Mysql查看表的建表语句