平台:AIX 5.3 单机 存在一个空闲磁盘hdisk1

总体思路:物理卷PV>卷组VG>逻辑卷LV(类型:raw)->添加表空间

 

 

 

 

1.查看所有可用卷组

# lsvg -o

rootvg

 

 

2.创建ORACLE的卷组datavg

# smitty lvm

         Volume Groups

                    Add a Volume Group

                            Add an Original Volume Group

                           

                                                                                      [Entry Fields]

  VOLUME GROUP name                                  [datavg]

  Physical partition SIZE in megabytes                64                     +

* PHYSICAL VOLUME names                              [hdisk1]                +

  Force the creation of a volume group?               no                     +

  Activate volume group AUTOMATICALLY                 yes                    +

    at system restart?

  Volume Group MAJOR NUMBER                          []                      +#

  Create VG Concurrent Capable?                       no                     +

 

 

  # lsvg -o

datavg

rootvg

 

 

3.datavg创建lvdata002裸设备

创建裸设备

# mklv -t raw -y lvdata002 -a e -e x -o y datavg 10

lvdata002

-e x设置裸设备划分到多盘

分配10PP,即640M

# lsvg -l datavg

datavg:

LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT

lvdata002           raw        10      10      1    closed/syncd    N/A

该卷组1个逻辑卷(裸设备)未被使用(如果在显示结果中closed/syncd状态的逻辑卷)

 

赋予裸设备权限

# chown -R oracle:oinstall /dev/rlvdata*

# chown -R oracle:oinstall /dev/lvdata*

 

 

4.登陆ORACLE,给表空间USERS添加裸设备数据文件

SQL>  alter tablespace users add datafile '/dev/rlvdata002' size 100M; //SIZE 不能等于或大于LV值,裸设备名/dev/rlv*

 

Tablespace altered.

添加成功