1.查看需要扩容的目录

bash-4.2# df -g

Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on

/dev/hd4          11.00      9.21   17%    10953     1% /

/dev/hd2           9.00      6.73   26%    47955     3% /usr

/dev/hd9var        3.50      3.14   11%     3301     1% /var

/dev/hd3           2.00      0.99   51%       87     1% /tmp

/dev/hd1           0.50      0.37   27%      430     1% /home

/dev/hd11admin      0.25      0.25    1%        5     1% /admin

/proc                 -         -    -         -     -  /proc

/dev/hd10opt       3.00      2.88    4%     2496     1% /opt

2、查看当前活动的卷,只有两个,经与工程师确认数据库归档日志目录在ROOTVG卷上。:因为我只有一个VG卷


bash-4.2# lsvg -l rootvg

rootvg:

LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT

hd5                 boot       1       1       1    closed/syncd  N/A

hd6                 paging     15      15      1    open/syncd    N/A

hd8                 jfs2log    1       1       1    open/syncd    N/A

hd4                 jfs2       352     352     1    open/syncd    /

hd2                 jfs2       288     288     1    open/syncd    /usr

hd9var              jfs2       112     112     1    open/syncd    /var

hd3                 jfs2       64      64      1    open/syncd    /tmp

hd1                 jfs2       16      16      1    open/syncd    /home

hd10opt             jfs2       96      96      1    open/syncd    /opt

hd11admin           jfs2       8       8       1    open/syncd    /admin

发现当前目录的PPS大小为32

bash-4.2# lsvg rootvg



VOLUME GROUP:       rootvg                   VG IDENTIFIER:  00c0bd4000004c0000000144f505c57f

VG STATE:           active                           PP SIZE:        32 megabyte(s)

VG PERMISSION:      read/write                TOTAL PPs:      959 (30688 megabytes)

MAX LVs:            256                                 FREE PPs:       6 (192 megabytes)

LVs:                10                                       USED PPs:       953 (30496 megabytes)

OPEN LVs:           9                                   QUORUM:         2 (Enabled)

TOTAL PVs:          1                                  VG DESCRIPTORS: 2

STALE PVs:          0                                   STALE PPs:      0

ACTIVE PVs:         1                                   AUTO ON:        yes

MAX PPs per VG:     32512

MAX PPs per PV:     1016                           MAX PVs:        32

LTG size (Dynamic): 256 kilobyte(s)           AUTO SYNC:      no

HOT SPARE:          no                                BB POLICY:      relocatable

PV RESTRICTION:     none                        INFINITE RETRY: no

DISK BLOCK SIZE:    512



查看rootvg卷组信息可知每个PPS大小为32M,目前rootvg还剩6个PPS,共计192M;

4、
扩展文件系统的空间
  
使用命令 # chfs -a size=+32m /oracle/BWP/oraarch #意思是给/oracle/BWP/oraarch增加32m的空间
执行完再lsvg 发现free pp size 没有增加,但是用smitty chfs 来做的时候
发现,增加的 size 在/oracle/BWP/oraarch上已经体现了。

使用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                                    /home
  NEW mount point                                    [/home]
  SIZE of file system
          Unit Size                                   512bytes                                   +
          Number of units                            [1056768]                                     #
  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 1056768   #扩容后包含已有空间的容量

5、再检查一下看新增上没有

bash-4.2# df -m

Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on

/dev/hd4       11264.00   9435.95   17%    10953     1% /

/dev/hd2        9216.00   6895.77   26%    47955     3% /usr

/dev/hd9var     3584.00   3215.05   11%     3309     1% /var

/dev/hd3        2048.00   1013.15   51%       87     1% /tmp

/dev/hd1         657.25    374.75   63%      430     1% /home

/dev/hd11admin    256.00    255.59    1%        5     1% /admin

/proc                 -         -    -         -     -  /proc

/dev/hd10opt    3072.00   2950.13    4%     2496     1% /opt



好了,一切正常,扩容成功。