AIX扩展文件系统空间

AIX扩展文件系统空间


目的:扩展u03文件系统的空间


u03为56,55共同可以访问的文件系统上,他在卷组backvg上

从添加硬盘开始:

55操作

1.查看检测到的新硬盘
   #  cfgmgr

2.列出查找到的 新硬盘

   #lspv
3.
   #  chdev -l hdisk5 -a pv=yes    ---- hdisk5  新加的盘、

4 。扩展卷组的空间 

  # extendvg  backvg hdisk5        ---扩展卷组的空间

5.扩展文件系统的空间
 
  # chfs -a size=+40G /u03                  -----这里是给u03文件系统增加40G的空间,还有这里的“G”是大写的
   Filesystem size changed to 384040960

eg:

  # chfs -a size=+40g /u03
chfs: 0506-963 Invalid attribute value: +40g
Usage: chfs [-n Nodename] [-m NewMountpoint] [-u Group] [-A {yes|no}]
        [-t {yes|no}] [-p {ro|rw}] [-a Attribute=Value] [-d Attribute]
        Filesystem

6.查看u03的空间,可以看到空间已经增加了

  # df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4          10.00      9.99    1%     1944     1% /
/dev/hd2          10.00      8.73   13%    30788     2% /usr
/dev/hd9var        5.00      4.94    2%      645     1% /var
/dev/hd3           1.00      0.91    9%      179     1% /tmp
/dev/fwdump        0.50      0.50    1%        4     1% /var/adm/ras/platform
/dev/hd1          20.00     15.89   21%    19419     1% /home
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       1.00      0.95    6%     2150     1% /opt
/dev/fslv00       49.00     23.20   53%       12     1% /ora_back
/dev/lv1         143.12     34.76   76%      173     1% /u02
/dev/lv2         183.12    108.46   41%       13     1% /u03

 


到现在为止,55可以看到u03的空间增加了,但卷组的属性变了,56就不认卷组backvg了,所以我
还要在56上做相应的操作来让56识别卷组backvg

 

 

首先在55机器上执行
# ls -l /dev/backvg
crw-rw----   1 root     system       51,  0 Dec 18 2007  /dev/backvg


56上的操作


1.清楚56上的原有backvg在odm库中的配置信息

# exportvg backvg

2.导入backvg的信息到56机器

# smit importvg


                                                        [Entry Fields]
  VOLUME GROUP name                                  [backvg]
* PHYSICAL VOLUME name                               [hdisk5]   ---backvg里的任何一个                                                                       +
  Volume Group MAJOR NUMBER                          [51]      这个51相当于卷组的唯一标识;要没有他,两边机器就不能保证访问相同的卷组backvg                                                                   +#


回车保存,退出,命令执行成功
 
按理论上说,到这里就已经ok了,u03的空间已经扩展,并且56和55的机器也可以
访问卷组backvg

核查:
56
# varyonvg backvg
# mount /u03
# df -g
# umount /u03
# varyoff backvg

55
# varyonvg backvg
# mount /u03
# df -g
# umount /u03
# varyoff backvg

 

在这方面AIX和Tru64 UNIX绝对是最好的,AIX里只要卷还有空间,直接扩FS就是


####################################################################################

 


扩展的过程中遇到的错误

1.扩展文件系统u03的时候

# chfs -a size=+40G /u03
0516-787 extendlv: Maximum allocation for logical volume lv2
        is 1145.

从这个提示可以看到逻辑卷lv2已经到达最大的pp扩展数

 

# lsvg -l backvg
backvg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
loglv2              jfs2log    1     1     1    closed/syncd  N/A
lv2                 jfs2       1465  1465  2    closed/syncd  /u03

# lsvg -p backvg
backvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk4            active            1183        0           00..00..00..00..00
hdisk5            active            1159        876         232..00..180..232..232

那就扩展lv2的最大pp是数


# smit chlv
           ==>Change a logical Volume
                ==>Logical volume name     [lv2]   ----lv2   人为填写

然后打开一个列表


                                                      
* Logical volume NAME                                 lv2
  Logical volume TYPE                                [jfs2]                                                                      +
  POSITION on physical volume                         middle                                                                     +
  RANGE of physical volumes                           minimum                                                                    +
  MAXIMUM NUMBER of PHYSICAL VOLUMES                 [16]                                                                         #
    to use for allocation
  Allocate each logical partition copy                yes                                                                        +
    on a SEPARATE physical volume?
  RELOCATE the logical volume during                  yes                                                                        +
    reorganization?
  Logical volume LABEL                               [/u03]
  MAXIMUM NUMBER of LOGICAL PARTITIONS               [3000]      -----这里原来是1145,我给改成3000                                                                    #
  SCHEDULING POLICY for reading/writing               parallel                                                                   +
    logical partition copies
  PERMISSIONS                                         read/write                                                                 +
  Enable BAD BLOCK relocation?                        yes                                                                        +
  Enable WRITE VERIFY?                                no                                                                         +
  Mirror Write Consistency?                           active                                                                     +
  Serialize IO?                                       no                                                                         +

回车保存,退出。

再执行扩展文件系统u03的命令

 # chfs -a size=+40G /u03                 
   Filesystem size changed to 384040960


 现在成功了。ok了

你可能感兴趣的:(unix,扩展,AIX,permissions,parallel,Allocation)