aix paging space的操作

新建paging space

mkps -n -s 3 datavg

-bash-3.2# mkps -n -s 3 datavg
paging01

-n参数表示馬上激活此页面空间

-s参数指定lp的大小

如果需要在下次系统重启动的时候激活空间则需要加-a参数

-bash-3.2# mkps -a -n -s 4 datavg
paging02
-bash-3.2# lsps -a
Page Space      Physical Volume   Volume Group Size %Used Active  Auto  Type Chksum
paging02        hdisk1            datavg          64MB     1   yes   yes    lv     0
paging01        hdisk2            datavg          48MB     4   yes    no    lv     0
paging00        hdisk2            datavg          32MB     1   yes   yes    lv     0
hd6             hdisk0            rootvg         512MB    23   yes   yes    lv     0
 

 

也可以使用smit mkps工具新建paging space

smit mkps

                                                               Add Another Paging Space

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  Volume group name                                   datavg
  SIZE of paging space (in logical partitions)       []                                                                                             #
  PHYSICAL VOLUME name                                                                                                                             +
  Start using this paging space NOW?                  no                                                                                           +
  Use this paging space each time the system is       no                                                                                           +
          RESTARTED?
  Checksum Size                                      []                                                                                            +#

 

查看paging space

-bash-3.2$ lsps -a
Page Space      Physical Volume   Volume Group Size %Used Active  Auto  Type Chksum
paging01        hdisk2            datavg          48MB     1   yes    no    lv     0
paging00        hdisk2            datavg          32MB     3   yes    no    lv     0
hd6             hdisk0            rootvg         512MB    23   yes   yes    lv     0
 

-bash-3.2$ lsps -s
Total Paging Space   Percent Used
      592MB              20%
 

-bash-3.2# lsps paging00
Page Space      Physical Volume   Volume Group Size %Used Active  Auto  Type Chksum
paging00        hdisk2            datavg          32MB     1   yes    no    lv     0
 

也可以smit lsps查看

                                                                    COMMAND STATUS

Command: OK            stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

Page Space      Physical Volume   Volume Group Size %Used Active  Auto  Type Chksum
paging01        hdisk2            datavg          48MB     1   yes    no    lv     0
paging00        hdisk2            datavg          32MB     3   yes    no    lv     0
hd6             hdisk0            rootvg         512MB    23   yes   yes    lv     0
 

激活paging space

设置 /etc/swapspaces 文件下paging space可用

swapon -a

 

激活指定的paging space

swapon /dev/paging00

 

 

也可smit swapon激活

                                                               Activate a Paging Space

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  PAGING SPACE name                                                                                                                                +


关闭paging space

swapoff

swapoff /dev/paging00

 

也可使用smit swapoff

                                                              Deactivate a Paging Space

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  PAGING SPACE name                                   paging01                                                                                     +

 

修改paging space

指定在系统下次重启动的时候激活此页空间

-bash-3.2# chps -a y paging00

 

增加页空间的大小

-bash-3.2# lsvg datavg
VOLUME GROUP:       datavg                   VG IDENTIFIER:  00cfff0e00004c000000013b42db5dfe
VG STATE:           active                   PP SIZE:        16 megabyte(s)
...

-bash-3.2# lsps -a
Page Space      Physical Volume   Volume Group Size %Used Active  Auto  Type Chksum
paging02        hdisk1            datavg          64MB     1   yes   yes    lv     0
paging01        hdisk2            datavg          48MB     4   yes    no    lv     0
paging00        hdisk2            datavg          32MB     1   yes   yes    lv     0
hd6             hdisk0            rootvg         512MB    23   yes   yes    lv     0
-bash-3.2# chps -s 1  paging02    #-s后面跟的要增加几个lp数量(16+64=80)
-bash-3.2# lsps -a
Page Space      Physical Volume   Volume Group Size %Used Active  Auto  Type Chksum
paging02        hdisk1            datavg          80MB     1   yes   yes    lv     0
paging01        hdisk2            datavg          48MB     4   yes    no    lv     0
paging00        hdisk2            datavg          32MB     1   yes   yes    lv     0
hd6             hdisk0            rootvg         512MB    23   yes   yes    lv     0
 

减少页面空间chps -d 1 paging00  #-s后面跟的要减少几个lp数量(16+64=80)

-bash-3.2# lsps -a
Page Space      Physical Volume   Volume Group Size %Used Active  Auto  Type Chksum
paging02        hdisk1            datavg          80MB     1   yes   yes    lv     0
paging01        hdisk2            datavg          48MB     4   yes    no    lv     0
paging00        hdisk2            datavg          32MB     1   yes   yes    lv     0
hd6             hdisk0            rootvg         512MB    23   yes   yes    lv     0
-bash-3.2# chps -d 1 paging00

shrinkps: Temporary paging space paging03 created.
shrinkps: Paging space paging00 removed.
shrinkps: Paging space paging00 recreated with new size.
-bash-3.2# 
-bash-3.2# lsps -a
Page Space      Physical Volume   Volume Group Size %Used Active  Auto  Type Chksum
paging02        hdisk1            datavg          80MB     1   yes   yes    lv     0
paging01        hdisk2            datavg          48MB     4   yes    no    lv     0
paging00        hdisk2            datavg          16MB     1   yes   yes    lv     0
hd6             hdisk0            rootvg         512MB    23   yes   yes    lv     0
 

也可以使用smit chps修改页空间

smit chps 命令后出现一选择页空间的提示选择框,选上你要修改的页空间

                                                   Change / Show Characteristics of a Paging Space

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  Paging space name                                   paging01
  Volume group name                                   datavg
  Physical volume name                                hdisk2
  NUMBER of additional logical partitions            []                                                                                             #
  Or NUMBER of logical partitions to remove          []                                                                                             #
  Use this paging space each time the system is       no                                                                                           +
          RESTARTED?
  Checksum Size                                      [0]                                                                                           +#

 

删除页空间

rmps 页空间名称

删除页空间前请先使用swapoff命令停止该页空间,否则会出现以下提示

-bash-3.2# rmps paging02
0517-062 rmps: Paging space paging02 is active.
0517-061 rmps: Cannot remove paging space paging02.

 

以下成功删除页空间

-bash-3.2# swapoff /dev/paging02
-bash-3.2# rmps paging02
rmlv: Logical volume paging02 is removed.
-bash-3.2# lsps -a
Page Space      Physical Volume   Volume Group Size %Used Active  Auto  Type Chksum
paging01        hdisk2            datavg          48MB     5   yes    no    lv     0
paging00        hdisk2            datavg          16MB     3   yes   yes    lv     0
hd6             hdisk0            rootvg         512MB    23   yes   yes    lv     0

 

也可以使用smit rmps删除(删除前也必须停止页空页,不然也会出现错误)

                                                                Remove a Paging Space

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  PAGING SPACE name                                   paging00                                                                                     +
 

成功删除如下:

                                                                    COMMAND STATUS

Command: OK            stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

rmlv: Logical volume paging00 is removed.

 



本文转自 pk2008 51CTO博客,原文链接:http://blog.51cto.com/837244/1075418

上一篇:SEO不仅仅是排名这么简单,还有这些你需要了解


下一篇:挖掘关键词同义的近义词提高排名