aix paging space的操作

本文涉及的产品
数据可视化DataV,5个大屏 1个月
可视分析地图(DataV-Atlas),3 个项目,100M 存储空间
简介:

新建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

相关实践学习
DataV Board用户界面概览
本实验带领用户熟悉DataV Board这款可视化产品的用户界面
阿里云实时数仓实战 - 项目介绍及架构设计
课程简介 1)学习搭建一个数据仓库的过程,理解数据在整个数仓架构的从采集、存储、计算、输出、展示的整个业务流程。 2)整个数仓体系完全搭建在阿里云架构上,理解并学会运用各个服务组件,了解各个组件之间如何配合联动。 3 )前置知识要求   课程大纲 第一章 了解数据仓库概念 初步了解数据仓库是干什么的 第二章 按照企业开发的标准去搭建一个数据仓库 数据仓库的需求是什么 架构 怎么选型怎么购买服务器 第三章 数据生成模块 用户形成数据的一个准备 按照企业的标准,准备了十一张用户行为表 方便使用 第四章 采集模块的搭建 购买阿里云服务器 安装 JDK 安装 Flume 第五章 用户行为数据仓库 严格按照企业的标准开发 第六章 搭建业务数仓理论基础和对表的分类同步 第七章 业务数仓的搭建  业务行为数仓效果图  
相关文章
|
Oracle 关系型数据库 Linux
|
SQL Oracle 关系型数据库
|
SQL Oracle 关系型数据库