AIX 采用了逻辑卷管理器(Logical Volumn Manager,LVM)和日志型文件系统的存储方式,其最大的优点是能够动态地改变文件系统的大小(增加和减少),而且文件系统可以突破单个硬盘的制约。可分配非连续空间,可以跨越多个硬盘,可以动态增大或者缩小逻辑卷的大小(jfs2支持)方便存储管理操作,包括文件系统的备份、分区的删除、新分区的建立和文件系统的恢复等,新的硬盘很容易动态地添加到系统。
· 物理卷(Physical Volumn, PV)
- # lspv
- hdisk0 00f7cd06d8def8ed rootvg active
- hdisk1 00f7cd063b845415 rootvg active
- hdisk2 none None
- hdisk3 none None
- # lspv hdisk0 查看hdisk0的属性
- PHYSICAL VOLUME: hdisk0 VOLUME GROUP: rootvg
- PV IDENTIFIER: 00f7cd06d8def8ed VG IDENTIFIER 00f7cd0600004c000000013b266f6271
- PV STATE: active
- STALE PARTITIONS: 0 ALLOCATABLE: yes
- PP SIZE: 512 megabyte(s) LOGICAL VOLUMES: 13
- TOTAL PPs: 558 (285696 megabytes) VG DESCRIPTORS: 2
- FREE PPs: 413 (211456 megabytes) HOT SPARE: no
- USED PPs: 145 (74240 megabytes) MAX REQUEST: 1 megabyte
- FREE DISTRIBUTION: 111..27..52..111..112
- USED DISTRIBUTION: 01..85..59..00..00
- MIRROR POOL: None
- # lspv -l hdisk0 查看在PV上分配的LV
- hdisk0:
- LV NAME LPs PPs DISTRIBUTION MOUNT POINT
- hd2 10 10 00..00..10..00..00 /usr
- hd11admin 1 1 00..00..01..00..00 /admin
- hd9var 6 6 00..00..06..00..00 /var
- hd8 1 1 00..00..01..00..00 N/A
- lg_dumplv 8 8 00..08..00..00..00 N/A
- hd4 10 10 00..00..10..00..00 /
- livedump 1 1 00..01..00..00..00 /var/adm/ras/livedump
- hd5 1 1 01..00..00..00..00 N/A
- hd6 16 16 00..16..00..00..00 N/A
- hd10opt 1 1 00..00..01..00..00 /opt
- oralv 60 60 00..60..00..00..00 /u01
- hd3 30 30 00..00..30..00..00 /tmp
- hd1 10 10 00..00..10..00..00 /home
- # lspv -p hdisk0 查看PV上PP的分布情况
- hdisk0:
- PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
- 1-1 used outer edge hd5 boot N/A
- 2-112 free outer edge
- 113-113 used outer middle hd6 paging N/A
- 114-121 used outer middle lg_dumplv sysdump N/A
- 122-122 used outer middle livedump jfs2 /var/adm/ras/livedump
- 123-137 used outer middle hd6 paging N/A
- 138-197 used outer middle oralv jfs2 /u01
- 198-224 free outer middle
- 225-225 used center hd8 jfs2log N/A
- 226-226 used center hd4 jfs2 /
- 227-227 used center hd2 jfs2 /usr
- 228-228 used center hd9var jfs2 /var
- 229-229 used center hd3 jfs2 /tmp
- 230-230 used center hd1 jfs2 /home
- 231-231 used center hd10opt jfs2 /opt
- 232-232 used center hd11admin jfs2 /admin
- 233-233 used center hd4 jfs2 /
- 234-237 used center hd2 jfs2 /usr
- 238-238 used center hd9var jfs2 /var
- 239-246 used center hd4 jfs2 /
- 247-251 used center hd2 jfs2 /usr
- 252-255 used center hd9var jfs2 /var
- 256-264 used center hd1 jfs2 /home
- 265-293 used center hd3 jfs2 /tmp
- 294-335 free center
- 336-446 free inner middle
- 447-558 free inner edge
- # lspv -M hdisk0 查看PP与LP的对应情况
- hdisk0:1 hd5:1
- hdisk0:2-112
- hdisk0:113 hd6:1
- hdisk0:114 lg_dumplv:1
- hdisk0:115 lg_dumplv:2
- hdisk0:116 lg_dumplv:3
- hdisk0:117 lg_dumplv:4
- hdisk0:118 lg_dumplv:5
- hdisk0:119 lg_dumplv:6
- hdisk0:120 lg_dumplv:7
- hdisk0:121 lg_dumplv:8
- hdisk0:122 livedump:1
- hdisk0:123 hd6:2
- 以下省略...
· 卷组(Volumn Group, VG)
卷组主要的信息有PP size、Quorum。PP size在创建时指定,或者由系统默认分配大小;QUORUM,默认全部为打开状态,如果rootvg 做了磁盘镜像,则通过"chvg –Qn rootvg"关闭quorum。
- # lsvg
- rootvg
- # lsvg -o 查看处于激活状态的VG
- rootvg
- # lsvg rootvg 查看rootvg的属性
- VOLUME GROUP: rootvg VG IDENTIFIER: 00f7cd0600004c000000013b266f6271
- VG STATE: active PP SIZE: 512 megabyte(s)
- VG PERMISSION: read/write TOTAL PPs: 1116 (571392 megabytes)
- MAX LVs: 256 FREE PPs: 834 (427008 megabytes)
- LVs: 13 USED PPs: 282 (144384 megabytes)
- OPEN LVs: 12 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
- PV RESTRICTION: none INFINITE RETRY: no
- # lsvg -p rootvg 查看rootvg卷组中的PV信息
- rootvg:
- PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
- hdisk0 active 558 413 111..27..52..111..112
- hdisk1 active 558 421 111..35..52..111..112
- # lsvg -l rootvg 查看rootvg卷组的LV信息
- rootvg:
- LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
- hd5 boot 1 2 2 closed/syncd N/A
- hd6 paging 16 32 2 open/syncd N/A
- hd8 jfs2log 1 2 2 open/syncd N/A
- hd4 jfs2 10 20 2 open/syncd /
- hd2 jfs2 10 20 2 open/syncd /usr
- hd9var jfs2 6 12 2 open/syncd /var
- hd3 jfs2 20 40 2 open/syncd /tmp
- hd1 jfs2 10 20 2 open/syncd /home
- hd10opt jfs2 1 2 2 open/syncd /opt
- hd11admin jfs2 1 2 2 open/syncd /admin
- lg_dumplv sysdump 8 8 1 open/syncd N/A
- livedump jfs2 1 2 2 open/syncd /var/adm/ras/livedump
- oralv jfs2 60 120 2 open/syncd /u01
· 物理分区(Physical Partition, PP)
· 逻辑卷(Logical Volumn, LV)
- # lslv hd1 查看hd1的属性
- LOGICAL VOLUME: hd1 VOLUME GROUP: rootvg
- LV IDENTIFIER: 00f7cd0600004c000000013b266f6271.8 PERMISSION: read/write
- VG STATE: active/complete LV STATE: opened/syncd
- TYPE: jfs2 WRITE VERIFY: off
- MAX LPs: 512 PP SIZE: 512 megabyte(s)
- COPIES: 2 SCHED POLICY: parallel
- LPs: 10 PPs: 20
- STALE PPs: 0 BB POLICY: relocatable
- INTER-POLICY: minimum RELOCATABLE: yes
- INTRA-POLICY: center UPPER BOUND: 32
- MOUNT POINT: /home LABEL: /home
- MIRROR WRITE CONSISTENCY: on/ACTIVE
- EACH LP COPY ON A SEPARATE PV ?: yes
- Serialize IO ?: NO
- INFINITE RETRY: no
- # lslv -l hd1 查看hd1在各个PV的分布情况
- hd1:/home
- PV COPIES IN BAND DISTRIBUTION
- hdisk0 010:000:000 100% 000:000:010:000:000
- hdisk1 010:000:000 100% 000:000:010:000:000
- # lslv -m hd1 查看hd1的LP在PV上的映射关系
- hd1:/home
- LP PP1 PV1 PP2 PV2 PP3 PV3
- 0001 0230 hdisk0 0272 hdisk1
- 0002 0256 hdisk0 0273 hdisk1
- 0003 0257 hdisk0 0274 hdisk1
- 0004 0258 hdisk0 0275 hdisk1
- 0005 0259 hdisk0 0276 hdisk1
- 0006 0260 hdisk0 0277 hdisk1
- 0007 0261 hdisk0 0278 hdisk1
- 0008 0262 hdisk0 0279 hdisk1
- 0009 0263 hdisk0 0280 hdisk1
- 0010 0264 hdisk0 0281 hdisk1
· 逻辑分区(Logical Partition, LP)
逻辑卷管理策略