NOVOTS KMS 词汇表 Glossary    联系我们 Contact Us
查询 Search  
   
按类别浏览 Browse by Category
NOVOTS KMS .: 操作系统 .: AIX .: IBM AIX创建lv

IBM AIX创建lv

IBM AIX创建lv

#lsvg 查看当前有哪些vg

rootvg
vgdb02
vgdb01
datavg

#lslv maindb_index 查看maindb_index这个lv 位于哪个vg上,新的lv也要与之相同。

LOGICAL VOLUME:     maindb_index           VOLUME GROUP:   datavg
LV IDENTIFIER:      0002b4d70000d60000000113ce2042d4.2 PERMISSION:     read/writ
e
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               raw                    WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        128 megabyte(s)
COPIES:                                 SCHED POLICY:   parallel
LPs:                96                     PPs:            96
STALE PPs:                              BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    16
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO

 

#lsvg datavg 查看datavg的pp值、剩余空间:

VOLUME GROUP:       datavg                   VG IDENTIFIER:  0002b4d70000d600000
00113ce2042d4
VG STATE:           active                   PP SIZE:        128 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      3198 (409344 megaby
tes)
MAX LVs:            256                      FREE PPs:       87 (11136 megabytes
)
LVs:                70                       USED PPs:       3111 (398208 megaby
tes)
OPEN LVs:           22                       QUORUM:         2
TOTAL PVs:                                VG DESCRIPTORS: 3
STALE PVs:                                STALE PPs:      0
ACTIVE PVs:                               AUTO ON:        no
MAX PPs per VG:     32512
MAX PPs per PV:     2032                     MAX PVs:        16
LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

可以看出,这个vg里每个pp大小为128m,剩余87个pp,即剩余11G

#smitty hacmp ->System Management (C-SPOC)->HACMP Logical Volume Management-> Shared Logical Volumes->Add a Shared Logical Volume,选择在哪个vg上创建,自动选择磁盘,创建lv,注意:

 Number of LOGICAL PARTITIONS里输入创建的pp数,例如创建5G的lv,则输入40(40*128=5120m)

lv名称里输入将创建的lv名称,如maindb_index2_5g

 

创建完成后,需要按esc+3回退到上层目录, Change a Shared Logical Volume,将这个lv的类型由jfs修改为raw

 

回车执行完成后按esc+0退出。

 

#cd /dev

#ls maindb_index2_5g

 ls rmaindb_index2_5g

即可查看到刚刚创建的lv名称.

# chown -R oracle:dba /dev/rmaindb_index2_10g 修改文件宿主
# chmod -R 644 /dev/rmaindb_index2_10g 修改文件权限

 

 [p55a1]#ls maindb_inde*
maindb_index     maindb_index2_5
[p55a1]#ls -l maindb_ind*
brw-rw----   1 root     system       48,  2 Feb 05 2010  maindb_index
brw-rw----   1 root     system       48, 70 Oct 12 14:58 maindb_index2_5
[p55a1]#ls -l rmaindb_ind*
crw-rw----   1 oracle   dba          48,  2 Oct 11 19:44 rmaindb_index
crw-rw----   1 root     system       48, 70 Oct 12 14:56 rmaindb_index2_5
[p55a1]#chown -R oracle:dba /dev/rmaindb_index2_5
[p55a1]#chmod -R 644 /dev/rmaindb_index2_5
[p55a1]#ls rmaindb_index2*
rmaindb_index2_5
[p55a1]#ls -l rmaindb_index2*
crw-r--r--   1 oracle   dba          48, 70 Oct 12 14:56 rmaindb_index2_5
[p55a1]#su - oracle
$ ORACLE_SID=maindb
$ export ORACLE_SID
$ sqlplus  /nolog

SQL*Plus: Release 9.2.0.4.0 - Production on Tue Oct 12 15:35:48 2010

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> conn /as sysdba;
Connected.
SQL> show instance_name;

SQL>alter tablespace INDX add datafile '/dev/rmaindb_index2_5' size 5000M autoextend off;

   表空间的大小要略小于裸设备的大小。


这篇文章对你多有用?

用户评语

添加评语
当前还没有评语.


.: .: .: .: .:
[ 登陆 ]
北京护航科技有限公司 2006

Novots Technologies Limited