日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

aix 下创建vg和lv

發布時間:2024/3/13 编程问答 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 aix 下创建vg和lv 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1、LVM背景介紹

AIX中,磁盤管理策略是一種Logical Volume Management的方法。簡單的說,就是將存儲劃分為物理卷PV(Phsical Volume)、邏輯卷組VG(Logical Volume Group)和邏輯卷LV(Logical Volume)三個層次進行管理。

物理卷是我們最直觀的磁盤或者分區,操作系統中可能有多種存儲設備。在LVM中,都將其視為物理卷對象(PV)。

若干物理卷可以劃歸到一個邏輯組織中進行統一管理,這就是邏輯卷組(Logical Volume Group)。LVG類似于一個存儲池,無論或大或小的PV被納入到LVG中,都是進行統一管理。對使用者而言,LVG是一個統一的虛擬“存儲”。LVG內部,數據存儲是以Physical PartitionPP)的方式進行劃分管理。所以我們在度量LVM的容量的時候,PP個數是一個重要指標。

LVG是一個存儲池對象,并不能直接作為存儲。我們需要在LVG中劃分出若干塊進行使用,這就是LVLogical Volume)。LV有自己的度量單位,和PP類似,成為LPLogical Partition)。通常PPLP是相同的。

創建LV之后,還要將其和特定目錄進行關聯,這個過程成為加載mount。下面是一個比較典型的LV存儲結構。

# df -g
Filesystem ? ?GB blocks ? ? ?Free %Used ? ?Iused %Iused Mounted on
/dev/hd4 ? ? ? ? ?10.00 ? ? ?9.82 ? ?2% ? ?10016 ? ? 1% /
/dev/hd2 ? ? ? ? ?10.00 ? ? ?8.06 ? 20% ? ?42464 ? ? 3% /usr
/dev/hd9var ? ? ? 30.00 ? ? 29.72 ? ?1% ? ? 6289 ? ? 1% /var
/dev/hd3 ? ? ? ? ?15.00 ? ? 14.99 ? ?1% ? ? ? 47 ? ? 1% /tmp
/dev/hd1 ? ? ? ? ? 5.00 ? ? ?5.00 ? ?1% ? ? ? ?5 ? ? 1% /home
/dev/hd11admin ? ? ?0.50 ? ? ?0.50 ? ?1% ? ? ? ?5 ? ? 1% /admin
/proc ? ? ? ? ? ? ? ? - ? ? ? ? - ? ?- ? ? ? ? - ? ? - ?/proc
/dev/hd10opt ? ? ? 5.00 ? ? ?4.86 ? ?3% ? ? 6970 ? ? 1% /opt
/dev/livedump ? ? ?0.50 ? ? ?0.50 ? ?1% ? ? ? ?4 ? ? 1% /var/adm/ras/livedump
/aha ? ? ? ? ? ? ? ? ?- ? ? ? ? - ? ?- ? ? ? ?18 ? ? 1% /aha
/dev/datalv01 ? 2500.00 ? 2499.62 ? ?1% ? ? ? ?4 ? ? 1% /db


File system中對應的各種磁盤,就是LV邏輯卷對象。使用LVM方法有很多好處,其中最大的就是可以動態進行空間拓展。比如,原有的LVG空間不足,可以直接加入一塊新盤到LVG中,之后拓展extend邏輯卷空間。

?

2、環境介紹

?

下面我們就在AIX 7.1環境下進行創建和拓展試驗。

# oslevel
7.1.0.0

?

當前系統中已經包括了兩個邏輯卷組,分別為默認操作系統rootvg和ebsdbvg。

# lsvg
rootvg
ebsdbvg


# lspv
hdisk0 ? ? ? ? ?00f67f7d344d7089 ? ? ? ? ? ? ? ? ? ?rootvg ? ? ? ? ?active ? ? ?
hdisk1 ? ? ? ? ?00f67f7d34bffeb2 ? ? ? ? ? ? ? ? ? ?rootvg ? ? ? ? ?active ? ? ?
hdisk2 ? ? ? ? ?00f67f7d58a1ec7a ? ? ? ? ? ? ? ? ? ?ebsdbvg ? ? ? ? active ? ?

各個LV對應AIX目錄結構,都有自己的空間限額和使用情況。

?

?

3、創建邏輯卷Logical Volume

?

當前ebsdbvg邏輯卷組情況如下:

# lsvg ebsdbvg
VOLUME GROUP: ? ? ? ebsdbvg ? ? ? ? ? ? ? ? ?VG IDENTIFIER: ?00f67f7d00004c000000014b5edcb051
VG STATE: ? ? ? ? ? active ? ? ? ? ? ? ? ? ? PP SIZE: ? ? ? ?1024 megabyte(s)
VG PERMISSION: ? ? ?read/write ? ? ? ? ? ? ? TOTAL PPs: ? ? ?3071 (3144704 megabytes)
MAX LVs: ? ? ? ? ? ?512 ? ? ? ? ? ? ? ? ? ? ?FREE PPs: ? ? ? 570 (583680 megabytes)
LVs: ? ? ? ? ? ? ? ?2 ? ? ? ? ? ? ? ? ? ? ? ?USED PPs: ? ? ? 2501 (2561024 megabytes)
OPEN LVs: ? ? ? ? ? 2 ? ? ? ? ? ? ? ? ? ? ? ?QUORUM: ? ? ? ? 2 (Enabled)
TOTAL PVs: ? ? ? ? ?1 ? ? ? ? ? ? ? ? ? ? ? ?VG DESCRIPTORS: 2
STALE PVs: ? ? ? ? ?0 ? ? ? ? ? ? ? ? ? ? ? ?STALE PPs: ? ? ?0
ACTIVE PVs: ? ? ? ? 1 ? ? ? ? ? ? ? ? ? ? ? ?AUTO ON: ? ? ? ?yes
MAX PPs per VG: ? ? 130048 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
MAX PPs per PV: ? ? 4064 ? ? ? ? ? ? ? ? ? ? MAX PVs: ? ? ? ?32
LTG size (Dynamic): 512 kilobyte(s) ? ? ? ? ?AUTO SYNC: ? ? ?no
HOT SPARE: ? ? ? ? ?no ? ? ? ? ? ? ? ? ? ? ? BB POLICY: ? ? ?relocatable?
PV RESTRICTION: ? ? none ? ? ? ? ? ? ? ? ? ? INFINITE RETRY: no
DISK BLOCK SIZE: ? ?512 ??

創建卷組之前要明確當前空間情況,使用lsvg結果中,對PPPhysical Partition)的使用情況是有明確的顯示。在上面中,總計有3071個PP,已經使用2501個PP(占2500GB左右,每個PP大概1GB)。

當前ebsdbvg下,邏輯卷情況如下:

# lsvg -l ebsdbvg
ebsdbvg:
LV NAME ? ? ? ? ? ? TYPE ? ? ? LPs ? ? PPs ? ? PVs ?LV STATE ? ? ?MOUNT POINT
datalv01 ? ? ? ? ? ?jfs2 ? ? ? 2500 ? ?2500 ? ?1 ? ?open/syncd ? ?/db
loglv00 ? ? ? ? ? ? jfs2log ? ?1 ? ? ? 1 ? ? ? 1 ? ?open/syncd ? ?N/A

?

創建logical volume,使用smitty可以通過層級菜單進入功能模塊,也可以使用快鍵關鍵字直接進入最近的模塊。創建logical volume,使用smitty mklv進入。

首先要求輸入Logical Volume Group名稱,也就是在哪一個Volume Group上進行創建。

?* VOLUME GROUP name ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[archlv] ? ? ? ??

?

注意,在smitty中,F3F4非常有用。F3是表示Cancel和退出用途,而F4是打開輸入項備選框,通過上下鍵進行控制。

從備選框中選擇出testmisvg。進入新增加LV表單填寫項目。

?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Add a Logical Volume


Type or select values in entry fields.
Press Enter AFTER making all desired changes.


[TOP] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [Entry Fields]
? Logical volume NAME ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[archlv] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
* VOLUME GROUP name ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ebsdbvg ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
* Number of LOGICAL PARTITIONS ? ? ? ? ? ? ? ? ? ? ? [450] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #
? PHYSICAL VOLUME names ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[hdisk2] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? +?
? 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 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+
[MORE...9] ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ?
F1=Help ? ? ? ? ? ? ? ? ? ? ? F2=Refresh ? ? ? ? ? ? ? ? ? ? F3=Cancel ? ? ? ? ? ? ? ? ? ? ?F4=List
F5=Reset ? ? ? ? ? ? ? ? ? ? ?F6=Command ? ? ? ? ? ? ? ? ? ? F7=Edit ? ? ? ? ? ? ? ? ? ? ? ?F8=Image
F9=Shell ? ? ? ? ? ? ? ? ? ? ?F10=Exit ? ? ? ? ? ? ? ? ? ? ? Enter=Do ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

?

注意:?Logical Volume Name中填寫要創建LV名稱,Logical Partitions數量就是用于指定創建LV的大小。區別是不像我們創建其他空間直接指定大小,而是指定LV的個數。之前,我們通過簡單計算可以看到一個LV的大小。所以可以指定個數計算出來。另一個注意的就是volume type,相當于格式化時候的文件類型。現在普遍推薦有日志機制的jsf2作為LV格式,如果不指定就默認選擇jsf??梢酝ㄟ^F6查看對應的命令為:?/usr/sbin/mklv -y'archlv' -t'jfs2' ebsdbvg 450 hdisk2 ?


命令行判斷添加成功,并且可以看到分配LP情況。

?# lsvg -l ebsdbvg
ebsdbvg:
LV NAME ? ? ? ? ? ? TYPE ? ? ? LPs ? ? PPs ? ? PVs ?LV STATE ? ? ?MOUNT POINT
datalv01 ? ? ? ? ? ?jfs2 ? ? ? 2500 ? ?2500 ? ?1 ? ?open/syncd ? ?/db
loglv00 ? ? ? ? ? ? jfs2log ? ?1 ? ? ? 1 ? ? ? 1 ? ?open/syncd ? ?N/A
archlv ? ? ? ? ? ? ?jfs2 ? ? ? 450 ? ? 450 ? ? 1 ? ?closed/syncd ?N/A

# lslv datalv01
LOGICAL VOLUME: ? ? datalv01 ? ? ? ? ? ? ? VOLUME GROUP: ? ebsdbvg
LV IDENTIFIER: ? ? ?00f67f7d00004c000000014b5edcb051.1 PERMISSION: ? ? read/write
VG STATE: ? ? ? ? ? active/complete ? ? ? ?LV STATE: ? ? ? opened/syncd
TYPE: ? ? ? ? ? ? ? jfs2 ? ? ? ? ? ? ? ? ? WRITE VERIFY: ? off
MAX LPs: ? ? ? ? ? ?2500 ? ? ? ? ? ? ? ? ? PP SIZE: ? ? ? ?1024 megabyte(s)
COPIES: ? ? ? ? ? ? 1 ? ? ? ? ? ? ? ? ? ? ?SCHED POLICY: ? parallel
LPs: ? ? ? ? ? ? ? ?2500 ? ? ? ? ? ? ? ? ? PPs: ? ? ? ? ? ?2500
STALE PPs: ? ? ? ? ?0 ? ? ? ? ? ? ? ? ? ? ?BB POLICY: ? ? ?relocatable
INTER-POLICY: ? ? ? minimum ? ? ? ? ? ? ? ?RELOCATABLE: ? ?yes
INTRA-POLICY: ? ? ? middle ? ? ? ? ? ? ? ? UPPER BOUND: ? ?32
MOUNT POINT: ? ? ? ?/db ? ? ? ? ? ? ? ? ? ?LABEL: ? ? ? ? ?/db
DEVICE UID: ? ? ? ? 0 ? ? ? ? ? ? ? ? ? ? ?DEVICE GID: ? ? 0
DEVICE PERMISSIONS: 432 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
MIRROR WRITE CONSISTENCY: on/ACTIVE ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
EACH LP COPY ON A SEPARATE PV ?: yes ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Serialize IO ?: ? ? NO ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
INFINITE RETRY: ? ? no ??


注意:此時我們只是創建了磁盤,在AIX中,還有進行mount過程。將這個磁盤掛載在目錄下。

?# mkdir /db_arch?

?

smitty中,manfs可以直接建立file systemlogical volume之間的關系。

# smitty manfs
? Add / Change / Show / Delete File Systems
Move cursor to desired item and press Enter.
? Enhanced Journaled File Systems
? Journaled File Systems
? CDROM File Systems
? Network File System (NFS)

選擇Enhanced Journaled File Systems,進入配置項目。

Enhanced Journaled File Systems

Move cursor to desired item and press Enter.
? Add an Enhanced Journaled File System
? Add an Enhanced Journaled File System on a Previously Defined Logical Volume
? Change / Show Characteristics of an Enhanced Journaled File System
? Remove an Enhanced Journaled File System
? Manage Quotas for an Enhanced Journaled File System
? Defragment an Enhanced Journaled File System
? List Snapshots for an Enhanced Journaled File System
? Create Snapshot for an Enhanced Journaled File System
? Mount Snapshot for an Enhanced Journaled File System
? Remove Snapshot for an Enhanced Journaled File System
? Unmount Snapshot for an Enhanced Journaled File System
? Change Snapshot for an Enhanced Journaled File System
? Rollback an Enhanced Journaled File System to a Snapshot

選擇add,填寫表單,建立LVFile System之間的關系。

?Add an Enhanced Journaled File System

Type or select values in entry fields.
Press Enter AFTER making all desired changes.
??
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [Entry Fields]
* LOGICAL VOLUME name ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? archlv ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+
* MOUNT POINT ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[/db_arch]
? Mount AUTOMATICALLY at system restart? ? ? ? ? ? ? ?yes ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? +
? PERMISSIONS ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? read/write ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+
? Mount OPTIONS ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? +
? Block Size (bytes) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?4096 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+
? Logical Volume for Log ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+
? Inline Log size (MBytes) ? ? ? ? ? ? ? ? ? ? ? ? ? [] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#
? Extended Attribute Format ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? +
? ENABLE Quota Management? ? ? ? ? ? ? ? ? ? ? ? ? ? ?no ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+
? Enable EFS? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? no ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+
? Allow internal snapshots? ? ? ? ? ? ? ? ? ? ? ? ? ? no ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+
? Mount GROUP ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ?

填寫上關聯的logical volume名稱和對應的目錄。此外,推薦選擇上自動重啟系統加載。需要等待一小會,命令結果如下:

?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? COMMAND STATUS
Command: OK ? ? ? ? ? ?stdout: yes ? ? ? ? ? stderr: no
Before command completion, additional instructions may appear below.
File system created successfully.
471844596 kilobytes total disk space.
New File System size is 943718400

注意:此時并沒有加載上目錄。

?df -g看不到該分區被掛載上,需要手工執行:mount /db_arch


額外說明一下,在smitty中可以查看到File System的屬性信息,其中有詳細的空間情況。

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

?

[TOP]???????????????????????????????????????????????????[Entry Fields]

??File system name????????????????????????????????????/testlv01

??NEW mount point????????????????????????????????????[/testlv01]?????????????

??SIZE of file system

??????????Unit Size???????????????????????????????????512bytes???????????????+

??????????Number of units????????????????????????????[2621440]????????????????#

??Mount GROUP????????????????????????????????????????[]??????????????????????

??Mount AUTOMATICALLY at system restart???????????????yes????????????????????+

??PERMISSIONS?????????????????????????????????????????read/write?????????????+

??Mount OPTIONS??????????????????????????????????????[]??????????????????????+

??Start Disk Accounting???????????????????????????????no?????????????????????+

??Block Size (bytes)??????????????????????????????????4096???????????????????

??Inline Log??????????????????????????????????????????no

??Inline Log size (MBytes)???????????????????????????[0]??????????????????????#

Size of file system中,記錄每個單元512bytes,一共有2621440個單元。計算:2621440*512=1342177280 bytes=1.25GB,與df –g情況相符合。

?

4、調整LV和文件系統大小

?

當我們的空間使用耗盡之后,如果Logical Volume Group允許,我們就可以進行空間拓展調整LV的大小。

使用smitty lvsc命令,進入調整界面。

?

[root@TESTMIS:/]#smitty lvsc

?

Set Characteristic of a Logical Volume

?

Move cursor to desired item and press Enter.

?

??Change a Logical Volume

??Rename a Logical Volume

??Increase the Size of a Logical Volume

??Add a Copy to a Logical Volume

??Remove a Copy from a Logical Volume

?

選擇increase the size of a logical volume

?

??????????Increase the Size of a Logical Volume

?

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

?

??????????????????????????????????????????????[Entry Fields]

* LOGICAL VOLUME name?????????????????????????????????testmislv01

* Number of ADDITIONAL logical partitions????????????[5]???????????????????????#

??PHYSICAL VOLUME names??????????????????????????????[]??????????????????????+

??POSITION on physical volume?????????????????????????middle?????????????????+

??RANGE of physical volumes???????????????????????????minimum????????????????+

??MAXIMUM NUMBER of PHYSICAL VOLUMES?????????????????[64]?????????????????????#

????to use for allocation

??Allocate each logical partition copy????????????????yes????????????????????+

????on a SEPARATE physical volume?

??File containing ALLOCATION MAP?????????????????????[]

?

注意:輸入的是一個增加LP個數的取值,含義是在原來基礎上增加多少個LP。執行之后,我們就可以看到testmislv01LP個數增加。

?

[root@TESTMIS:/]#lslv testmislv01

LOGICAL VOLUME:?????testmislv01????????????VOLUME GROUP:???testmisvg

LV IDENTIFIER:??????00f7fcc800004c000000013c7051ca49.1 PERMISSION:?????read/write

VG STATE:???????????active/complete????????LV STATE:???????opened/syncd

TYPE:???????????????jfs2???????????????????WRITE VERIFY:???off

MAX LPs:????????????512????????????????????PP SIZE:????????128 megabyte(s)

COPIES:?????????????1??????????????????????SCHED POLICY:???parallel

LPs:????????????????15?????????????????????PPs:????????????15

STALE PPs:??????????0??????????????????????BB POLICY:??????relocatable

?

但是,對應的目錄testlv01空間沒有變化。

?

[root@TESTMIS:/]#df -g

Filesystem????GB blocks??????Free %Used????Iused %Iused Mounted on

(篇幅原因,有省略……

/dev/livedump??????0.25??????0.25????1%????????4?????1% /var/adm/ras/livedump

/dev/testmislv01??????1.25??????1.25????1%????????4?????1% /testlv01

?

這里需要進行手工的空間調整,調整File System的大小屬性。

?

[root@TESTMIS:/]#smitty manfs

?

???????????????????Add / Change / Show / Delete File Systems

?

Move cursor to desired item and press Enter.

?

??Enhanced Journaled File Systems??--選擇增強日志文件系統

??Journaled File Systems

??CDROM File Systems

??Network File System (NFS)

?

?

??Enhanced Journaled File Systems

?

Move cursor to desired item and press Enter.

?

??Add an Enhanced Journaled File System

??Add an Enhanced Journaled File System on a Previously Defined Logical Volume

??Change / Show Characteristics of an Enhanced Journaled File System

??Remove an Enhanced Journaled File System

??Manage Quotas for an Enhanced Journaled File System

??Defragment an Enhanced Journaled File System

??List Snapshots for an Enhanced Journaled File System

?

注意:這里面我們是輸入512byte的單元個數值,從原來的2621440修改為3932160。

?

[TOP]???????????????????????????????????????????????????[Entry Fields]

??File system name????????????????????????????????????/testlv01

??NEW mount point????????????????????????????????????[/testlv01]?????????????

??SIZE of file system

??????????Unit Size???????????????????????????????????512bytes???????????????+

??????????Number of units????????????????????????????[2621440]????????????????#

?

修改

?

?Change / Show Characteristics of an Enhanced Journaled File System

?

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

?

[TOP]???????????????????????????????????????????????????[Entry Fields]

??File system name????????????????????????????????????/testlv01

??NEW mount point????????????????????????????????????[/testlv01]?????????????

??SIZE of file system

??????????Unit Size???????????????????????????????????512bytes???????????????+

??????????Number of units????????????????????????????[3932160]????????????????#

?

這其中的依據是10LP上升到15LP,換算之后總大小為3932160unit。合計:3932160*512=1.875GB。

執行命令如下:

?

Before command completion, additional instructions may appear below.

Filesystem size changed to 3932160

?

此時檢查df –g,就可以發現容量變化。

?

[root@TESTMIS:/]#df -g | grep testmis

/dev/testmislv01??????1.88??????1.87????1%????????4?????1% /testlv01

整理自:http://blog.itpub.net/17203031/viewspace-1120819/

總結

以上是生活随笔為你收集整理的aix 下创建vg和lv的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。