AIX本地磁盘io优化
什么是磁盤的IO?
當一塊磁盤被格式化后,會被分成上百個磁道(tracks),每個磁道又將被分割成許多扇區(sectors),一般都是512 bytes。上下一串盤片中,相同半徑的磁道所組成的一個圓柱型的環壁,就稱為柱面。
磁帶的讀寫過程主要包括三個部分:
尋道時間:磁盤頭從原始位置徑直移動到目標數據所在的磁道的時間(平均是8毫秒)
旋轉延遲時間:通過盤片的旋轉,使得要讀取的扇區轉到讀寫頭的下方的時間。這個時間取決磁盤的轉數,比如一塊7200(轉/分鐘)的硬盤,120轉/秒,一轉大概需要8毫秒,平均旋轉延遲是4毫秒。
傳輸時間:磁盤傳輸數據的時間,這個取決于磁盤接口速率,SATA、FC、SAS盤的接口帶寬都各不相同。比如2Gb/s的帶寬,8K的數據塊大概只需要0.004毫秒。
磁盤的IO=尋道時間+旋轉延遲時間+傳輸時間
?
一塊已經固定磁盤無法去變更旋轉速率和傳輸時間,只能通過優化數據的存放位置來減少尋道時間和平均旋轉延遲,從而加快磁盤的IO 速率。
?
AIX下的磁盤結構:
AIX操作系統將PV劃分成5個區域,這些區域與他們在硬盤磁盤自身上的位置對應:外側邊緣(out edge)、外側中間(outer middle)、中心(center)、內側中間(inner middle)和內側邊緣(inner edge)。
PP是由一組大量的連續扇區組成,從1開始編號,out edge到inner edge根據磁盤的大小被分成了一定數量的PP數。5個區域分配的PP數量大致相等。如下:
# lspv -p hdisk1
hdisk1:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-1 used outer edge hd5 boot N/A
2-76 used outer edge fslv01 jfs2 /oracle
77-102 free outer edge
103-110 used outer edge lg_dumplv sysdump N/A
111-210 used outer middle hd6 paging N/A
211-211 used outer middle fwdump jfs2 /var/adm/ras/platform
212-213 used outer middle livedump jfs2 /var/adm/ras/livedump
214-218 used outer middle fslv01 jfs2 /oracle
219-219 used outer middle hd11admin jfs2 /admin
220-220 used center hd8 jfs2log N/A
221-239 used center hd2 jfs2 /usr
240-243 used center hd9var jfs2 /var
244-323 used center hd3 jfs2 /tmp
324-324 used center hd1 jfs2 /home
325-328 used center hd10opt jfs2 /opt
329-330 used inner middle hd4 jfs2 /
331-437 free inner middle
438-464 free inner edge
465-504 used inner edge testlv jfs2 /test
505-546 free inner edge
總共有546個PPS:
outer edge的PPS=110
outer middle的PPS=109
center的PPS=109
inner middle的PPS=109
inner edge的PPS=109
其中/oracle 文件系統對應fslv01的被分配到了2個區域,前5個PP在outer middle區域,其他PP在out edge中。
[html] viewplaincopyprint?
# lslv -p hdisk1 fslv01
hdisk1:fslv01:/oracle
USED 0006 0007 0008 0009 0010 0011 0012 0013 0014 1-10
0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 11-20
0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 21-30
0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 31-40
0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 41-50
0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 51-60
0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 61-70
0075 0076 0077 0078 0079 0080 FREE FREE FREE FREE 71-80
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 81-90
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 91-100
FREE FREE USED USED USED USED USED USED USED USED 101-110
?
USED USED USED USED USED USED USED USED USED USED 111-120
USED USED USED USED USED USED USED USED USED USED 121-130
USED USED USED USED USED USED USED USED USED USED 131-140
USED USED USED USED USED USED USED USED USED USED 141-150
USED USED USED USED USED USED USED USED USED USED 151-160
USED USED USED USED USED USED USED USED USED USED 161-170
USED USED USED USED USED USED USED USED USED USED 171-180
USED USED USED USED USED USED USED USED USED USED 181-190
USED USED USED USED USED USED USED USED USED USED 191-200
USED USED USED USED USED USED USED USED USED USED 201-210
USED USED USED 0001 0002 0003 0004 0005 USED 211-219
?
USED USED USED USED USED USED USED USED USED USED 220-229
USED USED USED USED USED USED USED USED USED USED 230-239
USED USED USED USED USED USED USED USED USED USED 240-249
USED USED USED USED USED USED USED USED USED USED 250-259
USED USED USED USED USED USED USED USED USED USED 260-269
USED USED USED USED USED USED USED USED USED USED 270-279
USED USED USED USED USED USED USED USED USED USED 280-289
USED USED USED USED USED USED USED USED USED USED 290-299
USED USED USED USED USED USED USED USED USED USED 300-309
USED USED USED USED USED USED USED USED USED USED 310-319
USED USED USED USED USED USED USED USED USED 320-328
?
USED USED FREE FREE FREE FREE FREE FREE FREE FREE 329-338
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 339-348
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 349-358
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 359-368
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 369-378
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 379-388
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 389-398
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 399-408
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 409-418
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 419-428
FREE FREE FREE FREE FREE FREE FREE FREE FREE 429-437
?
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 438-447
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 448-457
FREE FREE FREE FREE FREE FREE FREE USED USED USED 458-467
USED USED USED USED USED USED USED USED USED USED 468-477
USED USED USED USED USED USED USED USED USED USED 478-487
USED USED USED USED USED USED USED USED USED USED 488-497
USED USED USED USED USED USED USED FREE FREE FREE 498-507
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 508-517
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 518-527
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 528-537
FREE FREE FREE FREE FREE FREE FREE FREE FREE 538-546
# lslv -phdisk1 fslv01
hdisk1:fslv01:/oracle
USED????? 0006?????0007????? 0008????? 0009?????0010????? 0011????? 0012?????0013????? 0014??????????? 1-10
0015????? 0016?????0017????? 0018????? 0019?????0020????? 0021????? 0022?????0023????? 0024??????????? 11-20
0025????? 0026?????0027????? 0028????? 0029?????0030????? 0031????? 0032?????0033????? 0034??????????? 21-30
0035????? 0036?????0037????? 0038????? 0039?????0040????? 0041????? 0042?????0043????? 0044??????? ????31-40
0045????? 0046?????0047????? 0048????? 0049?????0050????? 0051????? 0052?????0053????? 0054??????????? 41-50
0055????? 0056?????0057????? 0058????? 0059?????0060????? 0061????? 0062?????0063????? 0064??????????? 51-60
0065????? 0066?????0067????? 0068????? 0069?????0070????? 0071????? 0072?????0073????? 0074??????????? 61-70
0075????? 0076?????0077?? 0078????? 0079?????0080????? FREE????? FREE?????FREE????? FREE?????????????? 71-80
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE??????????? 81-90
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE??????????? 91-100
FREE????? FREE?????USED????? USED????? USED?????USED????? USED????? USED?????USED ?????USED????????? 101-110
?
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 111-120
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 121-130
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 131-140
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 141-150
USED????? USED?????USED????? USED ?????USED?????USED????? USED????? USED?????USED????? USED????????? 151-160
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED???????? 161-170
USED????? USED?????USED????? USED????? USED?????USED????? USED??? ??USED?????USED????? USED????????? 171-180
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 181-190
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????? ????191-200
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 201-210
USED????? USED?????USED????? 0001????? 0002?????0003????? 0004????? 0005?????USED??????????????????? 211-219
?
USED????? USED?????USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED????????? 220-229
USED????? USED?????USED?? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 230-239
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 240-249
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 250-259
USED????? USED?????USED????? USED????? USED????USED????? USED????? USED?????USED? ????USED????????? 260-269
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 270-279
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 280-289
USED? ????USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 290-299
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 300-309
USED????? USED?????USED????? USED??? ??USED?????USED????? USED????? USED?????USED????? USED????????? 310-319
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED???????????????????? 320-328
?
USED????? USED?????FREE????? FREE????? FREE?????FREE????? FREE?? ???FREE?????FREE????? FREE????????? 329-338
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 339-348
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE???? ?????349-358
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 359-368
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 369-378
FREE????? FREE?????FREE????? FREE?????FREE????? FREE????? FREE??FREE????? FREE????? FREE???????????? 379-388
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 389-398
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 399-408
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE???? FREE????????? 409-418
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 419-428
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE??????????????????? 429-437
?
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 438-447
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 448-457
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? USED?????USED????? USED????????? 458-467
USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 468-477
USED????? USED????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED?????????? 478-487
USED????? USED?????USED????? USED????? USED?????USED????? USED? ????USED?????USED????? USED????????? 488-497
USED????? USED?????USED????? USED????? USED?????USED????? USED????? FREE?????FREE????? FREE????????? 498-507
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE??? ??????508-517
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 518-527
FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 528-537
FREE????? FREE?????FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE??????????????????? 538-546
由于中心是磁盤頭經常通過的區域,所以越靠近中心,尋道時間就越短,從而加快整體的IO。而在out edge或者inner edge 的數據需要花費的尋道時間較長,從而導致應用程序的響應緩慢。
雖然outer edge的尋道時間長,但是由于在圓的外道,圓周的速度最快,所以outer edge的順序讀寫速度更快些。
?
下面測試下:
先將/dev/ fslv01的前5個pp移到out edge中:
?
#migratelp fslv01/1 hdisk1/77
# migratelp fslv01/2 hdisk1/78
# migratelp fslv01/3 hdisk1/79
#migratelp fslv01/4 hdisk1/80
# migratelp fslv01/5 hdisk1/81
# lspv -p hdisk1
hdisk1:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-1 used outer edge hd5 boot N/A
2-81 used outer edge fslv01 jfs2 /oracle
82-102 free outer edge
103-110 used outer edge lg_dumplv sysdump N/A
111-210 used outer middle hd6 paging N/A
211-211 used outer middle fwdump jfs2 /var/adm/ras/platform
212-213 used outer middle livedump jfs2 /var/adm/ras/livedump
214-218 free outer middle
219-219 used outer middle hd11admin jfs2 /admin
220-220 used center hd8 jfs2log N/A
221-239 used center hd2 jfs2 /usr
240-243 used center hd9var jfs2 /var
244-323 used center hd3 jfs2 /tmp
324-324 used center hd1 jfs2 /home
325-328 used center hd10opt jfs2 /opt
329-330 used inner middle hd4 jfs2 /
331-437 free inner middle
438-464 free inner edge
465-504 used inner edge testlv jfs2 /test
505-546 free inner edge
/oracle 文件系統已經全部位于out edge中了,選擇/oracle/tmp /test 進行測試:
?
先對outer edge進行測試:
#time dd if=/dev/zero of=/oracle/test bs=1024k count=4096
real 0m46.03s
user 0m0.03s
sys 0m11.36s
消耗時間為:46.03秒
Topas監控到的磁盤IO 為88.6M
接著對center進行測試:
#time dd if=/dev/zero of=/tmp/test bs=1024k count=4096
real 0m53.29s
user 0m0.02s
sys 0m12.16s
消耗時間為:53.29s秒
Topas監控到的磁盤IO 為77M
最后看下inner edge:
#time dd if=/dev/zero of=/test/test bs=1024k count=4096
real 1m5.75s
user 0m0.02s
sys 0m12.43s
消耗時間為:1分5.75秒
Topas監控到的磁盤IO 只有62M
?
由此看出,對于順序讀寫,Outer edge的確有很大的優勢。再來做一個測試,將oracle的lv拆分到多個區域,進行測試,類似如下:
[html] viewplaincopyprint?
# for i in 2 3 4 5 6 7 8 9
> do migratelp fslv01/$i hdisk1/33$i
> done
migratelp: Mirror copy 1 of logical partition 2 of logical ? ? volume
fslv01 migrated to physical partition 332 of hdisk1.
migratelp: Mirror copy 1 of logical partition 3 of logical ? ? volume
fslv01 migrated to physical partition 333 of hdisk1.
migratelp: Mirror copy 1 of logical partition 4 of logical ? ? volume
fslv01 migrated to physical partition 334 of hdisk1.
migratelp: Mirror copy 1 of logical partition 5 of logical ? ? volume
fslv01 migrated to physical partition 335 of hdisk1.
migratelp: Mirror copy 1 of logical partition 6 of logical ? ? volume
fslv01 migrated to physical partition 336 of hdisk1.
migratelp: Mirror copy 1 of logical partition 7 of logical ? ? volume
fslv01 migrated to physical partition 337 of hdisk1.
migratelp: Mirror copy 1 of logical partition 8 of logical ? ? volume
fslv01 migrated to physical partition 338 of hdisk1.
migratelp: Mirror copy 1 of logical partition 9 of logical ? ? volume
fslv01 migrated to physical partition 339 of hdisk1.
# for iin??? 2 3 4 5 6 7 8 9?
> domigratelp fslv01/$i hdisk1/33$i
> done
migratelp:Mirror copy 1 of logical partition 2 of logical volume
??????????????? fslv01 migrated to physicalpartition 332 of hdisk1.
migratelp:Mirror copy 1 of logical partition 3 of logical volume
??????????????? fslv01 migrated to physicalpartition 333 of hdisk1.
migratelp:Mirror copy 1 of logical partition 4 of logical volume
??????????????? fslv01 migrated to physicalpartition 334 of hdisk1.
migratelp:Mirror copy 1 of logical partition 5 of logical volume
??????????????? fslv01 migrated to physicalpartition 335 of hdisk1.
migratelp:Mirror copy 1 of logical partition 6 of logical volume
??????????????? fslv01 migrated to physicalpartition 336 of hdisk1.
migratelp:Mirror copy 1 of logical partition 7 of logical volume
??????????????? fslv01 migrated to physicalpartition 337 of hdisk1.
migratelp:Mirror copy 1 of logical partition 8 of logical volume
??????????????? fslv01 migrated to physicalpartition 338 of hdisk1.
migratelp:Mirror copy 1 of logical partition 9 of logical volume
??????????????? fslv01 migrated to physicalpartition 339 of hdisk1.
?
查看下/oracle 文件系統的pp分布:
?
#lspv -p hdisk1
hdisk1:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-1 used outer edge hd5 boot N/A
2-36 free outer edge
37-59 used outer edge fslv01 jfs2 /oracle
60-66 free outer edge
67-84 used outer edge fslv01 jfs2 /oracle
85-86 free outer edge
87-102 used outer edge fslv01 jfs2 /oracle
103-110 used outer edge lg_dumplv sysdump N/A
111-210 used outer middle hd6 paging N/A
211-211 used outer middle fwdump jfs2 /var/adm/ras/platform
212-213 used outer middle livedump jfs2 /var/adm/ras/livedump
214-218 used outer middle fslv01 jfs2 /oracle
219-219 used outer middle hd11admin jfs2 /admin
220-220 used center hd8 jfs2log N/A
221-239 used center hd2 jfs2 /usr
240-243 used center hd9var jfs2 /var
244-323 used center hd3 jfs2 /tmp
324-324 used center hd1 jfs2 /home
325-328 used center hd10opt jfs2 /opt
329-330 used inner middle hd4 jfs2 /
331-339 used inner middle fslv01 jfs2 /oracle
340-437 free inner middle
438-464 free inner edge
465-504 used inner edge testlv jfs2 /test
505-510 free inner edge
511-519 used inner edge fslv01 jfs2 /oracle
520-546 free inner edge
/oracle 目錄被分配到了4個區域,測下順序IO:
#time dd if=/dev/zero of=/oracle/test bs=1024k count=4096
real 0m53.32s
user 0m0.02s
sys 0m12.60s
IO 速度有所下降。如果是隨機IO,磁盤頭進行的尋道時間會大大的增加,IO 的速率就會受到很大的影響。
?
優化規則:
通過以上的磁盤尋道原理和AIX的LVM磁盤管理方式,優化本地磁盤應該遵循以下規則:
1. 讓 LV 盡可能保持連續。當文件系統數據分散在一個磁盤上時,硬盤頭需要花費更長的時間在尋道時間和旋轉延遲上。如果 LV 存在于一個連續的區域,會最大程度地縮短搜索時間,更快地找到文件。這就要求最好是一次性建好足夠大的LV,而不是經常去擴空間。
2. 將具有高 I/O、順序讀取或寫入操作的LV 放在外側邊緣。由于磁盤外側邊緣的速度因素,如果 LV 需要更快讀取或寫入較長序列(比如大型靜態文件或數據表內容)中的數據,外側邊緣的更高旋轉速度會有所幫助。
3.將具有高活躍度的 LV 放在靠近中心位置。如果您有一個文件系統具有大量讀取和寫入操作,并且需要快速響應,盡量分布在中心附近。如果空間足夠將swap空間也放在該區域。
4.將使用率較低的 LV 放在內部邊緣附近。如果您的文件系統很少使用或訪問,那么可以將它們放在具有最低 I/O 速度的磁盤區域內(內部邊緣上接近主軸的區域)。例如,很少使用的邏輯卷很適合放在這里。
5. 當存在多個swap 分區時,一塊磁盤最好只分配一個swap分區,而且大小要相等,從而減少跨區域的lv操作,增大IO 負擔。
6.如果可能將兩個磁盤分別創建一個獨立的分頁空間 LV,那么每個磁盤均可解決內存交換,效率將會翻倍。
7.盡可能分散 I/O 負載,以提高性能和冗余。如果您有一個較大的系統具有多個硬盤,可以通過將數據分散在一組磁盤組合中開利用它們。如果您選擇鏡像您的 PV,可以在多個硬盤上這么做,以便如果一個磁盤抽屜(drawer)出現故障,冗余不會限制到一個硬盤。參考參數range of physical volumes(minimum、maximum)
磁盤優化的常用工具:
?
查看工具:
1. 使用lsvg 查看VG的信息
查看所有的VG
#lsvg
查看激活的VG
#lsvg –o
查看VG的總體信息:
#lsvg rootvg
查看VG中lv的信息
# lsvg -l rootvg
查看VG在PV中的分布
#lsvg –p rootvg
2.lspv用來查看某塊磁盤的信息,如PVID、PP的大小、包含的LV數目、5個區域中PP的使用情況等等。如:
查看PV總體信息:
# lspv -L hdisk1
查看PV中LV的LPs、PPs、以及5個區域的總體分布大小
# lspv -l hdisk1
詳細查看PV中每個PP的使用情況:
#lspv –p hdisk1
3. lslv用來查看某個LV的特征、狀態以及其PPs在PV中的詳細分布
查看LV的總體信息:
#lslv –L fslv01
查看LV在PV中的分布信息:
#lslv –p hdisk1 fslv00
查看LV的鏡像在各個磁盤上的分布
#lslv –l fslv00
查看LV的LP對應的PP的分布信息
#lslv –m fslv00
遷移工具:
1. chlv、smit chlv用來更改LV的屬性,及PP在PV上的分布,使得LV的PP盡可能變的連續。
#chlv -a e -e x -r y -s n -u 5 fslv00
2. migratepv用來遷移PV上的LV到其他PVs上 比如將hdisk1上的LV遷移到hdisk6和hdisk7上
#migratepv hdisk1 hdisk6 hdisk7
將lv01 從hdisk1遷移到hdisk6
#migratepv –l lv01 hdisk1 hdisk6
?
3. migratelp用來遷移LV上的某個lp到指定的PV的pp上
比如將lv01 上的第一個LP遷移到 hdisk1上的第100個PP上
#migratelp lv01/1 hdisk1/100
將lv01 上的第3個LP的第二個鏡像拷貝遷移到hdisk1上
#migratelp lv01/3/2 hdisk1
?
4. mirrorvg和unmirror
將vg生成3份鏡像
#mirrorvg -c 3 datavg
生成默認鏡像(2份)
#mirrorvg datavg
更換鏡像的壞盤
#unmirrorvg datavg hdisk7
#reducevg datavg hdisk7
#rmdev -dl hdisk7
#extendvg datavg hdisk7
#mirrorvg datavg hdisk7
在指定的PV上生成鏡像
#mirrorvg -m datavg hdisk2
將鏡像工作放入后臺運行
#mirrorvg –S workvg
5. Mklvcopy 用來單獨將某個LV進行復制
比如將lv01 在hdisk1的middle區域創建一個鏡像
#mklvcopy –a m –m lv01 hdisk1
?
6. reorgvg [-i],-i 參數用于3塊以上PV重組,在重組時,臨時文件存放在/tmp目錄下確保/tmp目錄的空間大小。
重組整個vg
#reoravg rootvg
重組指定LV
#reoravg rootvg lv01 lv02 v03
重組指定PV上的LV
#echo "hdisk4 hdisk6" | reorgvg-i vg02 lv203 lv205
轉自:http://blog.csdn.net/lixz_2008/article/details/7855049
總結
以上是生活随笔為你收集整理的AIX本地磁盘io优化的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql中关于count(*) co
- 下一篇: xmpp muc 群聊协议 1