天天看點

AIX邏輯卷管理

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

[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

<a href="http://jueshitou.blog.51cto.com/attachment/201204/16/385947_1334575725JVKa.png"></a>

AIX預設是jfs 是以選擇JFS增強型

<a href="http://jueshitou.blog.51cto.com/attachment/201204/16/385947_13345757259hE6.png"></a>

因為前面已經建立過lv是以我們選擇在標明的lv上建立fs

<a href="http://jueshitou.blog.51cto.com/attachment/201204/16/385947_1334575729HRzf.png"></a>

接下來可以使用F4選擇邏輯卷,避免手寫出錯

<a href="http://jueshitou.blog.51cto.com/attachment/201204/16/385947_13345757308M6s.png"></a>

設定自動挂載

<a href="http://jueshitou.blog.51cto.com/attachment/201204/16/385947_1334575730TpeT.png"></a>

     本文轉自 珏石頭 51CTO部落格,原文連結:http://blog.51cto.com/gavinshaw/836058,如需轉載請自行聯系原作者