lspv :查看系统硬盘
lspv hdisk# :查看硬盘hdisk#的空间分配情况
lsvg :查看系统VG
lsvg vg_name : 查看VG的空间分配情况
lsvg -l vg_name: 查看VG中LV分配情况以及对应的文件系统
df -k :查看文件系统使用情况。
综合这些,可以大致算出系统硬盘已分配了多少空间,实际已经使用了多少空间。
创建逻辑卷
将ORACLE存放数据目录对应lv lv_ora设置为8G,通过bc计算
# bc
1024*8/512
16
对应的pp数分别为16
lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 00f7569400004c0000000136a01b8877
VG STATE: active PP SIZE: 512 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1116 (571392 megabytes)
MAX LVs: 256 FREE PPs: 790 (404480 megabytes)
LVs: 12 USED PPs: 326 (166912 megabytes)
OPEN LVs: 11 QUORUM: 1 (Disabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 1024 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
2、创建逻辑卷
[tydic91:root:/]#smitty mklv
Add a Logical Volume
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
按F4,列VG组,选择oradatavg
Add a Logical Volume
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Logical volume NAME [lv_ora]
* VOLUME GROUP name rootvg
* Number of LOGICAL PARTITIONS [16] #
PHYSICAL VOLUME names [] +
Logical volume TYPE [jfs2] +
POSITION on physical volume middle +
RANGE of physical volumes minimum +
MAXIMUM NUMBER of PHYSICAL VOLUMES [] #
to use for allocation
Number of COPIES of each logical 1 +
partition
Mirror Write Consistency? active +
Allocate each logical partition copy yes +
on a SEPARATE physical volume?
RELOCATE the logical volume during yes +
reorganization?
Logical volume LABEL []
MAXIMUM NUMBER of LOGICAL PARTITIONS [512] #
Enable BAD BLOCK relocation? yes +
SCHEDULING POLICY for writing/reading parallel +
logical partition copies
Enable WRITE VERIFY? no +
File containing ALLOCATION MAP []
Stripe Size? [Not Striped] +
Serialize IO? no +
按两次enter后:
Command: OK stdout: yes stderr: no
Before command completion, additional instructions may appear below.
lv_ora
挂载lv到文件系统
# smitty fs
AIX默认是jfs 所以选择JFS增强型
因为前面已经创建过lv所以我们选择在选定的lv上创建fs
接下来可以使用F4选择逻辑卷,避免手写出错
设置自动挂载