目录


1.      概述… 2


2.      基本术语… 2


2.1.       物理存储介质… 2


2.2.       物理卷PV. 2


2.3.       卷组VG.. 3


2.4.       物理块PE. 3


2.5.       逻辑卷LV. 3


2.6.       逻辑块LE. 3


2.7.       Linux下的LVM和AIX下的LVM.. 3


3.      工作原理… 4


4.      Linux下LVM管理… 5


4.1.       创建步骤… 5


4.1.1.        创建PV. 5


4.1.2.        查看PV. 5


4.1.3.        创建VG.. 6


4.1.4.        激活VG.. 6


4.1.5.        查看VG.. 6


4.1.6.        创建LV. 7


4.1.7.        格式化并挂载LV. 8


4.2.       PV管理… 8


4.2.1.        新增PV. 8


4.2.2.        查看PV. 10


4.2.3.        修改PV. 10


4.2.4.        删除PV. 10


4.3.       VG管理… 11


4.3.1.        新增VG.. 11


4.3.2.        查看VG.. 11


4.3.3.        向VG中添加物理卷… 12


4.3.4.        从VG中删除物理卷… 12


4.3.5.        修改VG属性… 12


4.3.6.        删除VG.. 14


4.4.       LV管理… 14


4.4.1.        新增LV. 14


4.4.2.        LV格式化并挂载… 15


4.4.3.        查看LV. 16


4.4.4.        扩展逻辑卷空间… 16


4.4.5.        缩小逻辑卷空间… 16


4.4.6.        删除逻辑卷… 17


4.4.7.        修改逻辑卷大小… 17


4.4.8.        修改文件系统大小… 17


5.      AIX下LVM管理… 18


 




 



<![if !supportLists]>1.   <![endif]>概述



LVM是 Logical Volume
Manager
(逻辑卷管理)的简写,它是Linux环境下对磁盘分区进行管理的一种机制,它由Heinz Mauelshagen在Linux 2.4内核上实现,目前最新版本为:稳定版1.0.5,开发版 1.1.0-rc2,以及LVM2开发版。



LVM是逻辑盘卷管理(Logical Volume
Manager
)的简称,它是Linux环境下对磁盘分区进行管理的一种机制,LVM是建立在硬盘和分区之上的一个逻辑层,来提高磁盘分区管理的灵活性。



前面谈到,LVM是在磁盘分区和文件系统之间添加的一个逻辑层,来为文件系统屏蔽下层磁盘分区布局,提供一个抽象的盘卷,在盘卷上建立文件系统。



物理卷(physical volume)物理卷就是指硬盘分区或从逻辑上与磁盘分区具有同样功能的设备(如RAID),是LVM的基本存储逻辑块,但和基本的物理存储介质(如分区、磁盘等)比较,却包含有与LVM相关的管理参数。



<![if !supportLists]>2.   <![endif]>基本术语



<![if !supportLists]>2.1.<![endif]>物理存储介质



这里指系统的存储设备:硬盘,是存储系统最低层的存储单元。



<![if !supportLists]>2.2.<![endif]>物理卷PV



physical volume,PV。物理卷就是指硬盘分区或从逻辑上与磁盘分区具有同样功能的设备(如RAID),是LVM的基本存储逻辑块,但和基本的物理存储介质(如分区、磁盘等)比较,却包含有与LVM相关的管理参数。



<![if !supportLists]>2.3.<![endif]>卷组VG



Volume Group,VG。LVM卷组类似于非LVM系统中的物理硬盘,其由物理卷组成。可以在卷组上创建一个或多个“LVM分区”(逻辑卷),LVM卷组由一个或多个物理卷组成。



<![if !supportLists]>2.4.<![endif]>物理块PE



physical extent,PE。每一个物理卷被划分为称为PE(PhysicalExtents)的基本单元,具有唯一编号的PE是可以被LVM寻址的最小单元。PE的大小是可配置的,默认为4MB。



<![if !supportLists]>2.5.<![endif]>逻辑卷LV



logical volume,LV。LVM的逻辑卷类似于非LVM系统中的硬盘分区,在逻辑卷之上可以建立文件系统(比如/home或者/usr等)。



<![if !supportLists]>2.6.<![endif]>逻辑块LE



logical extent,LE。逻辑卷也被划分为被称为LE(Logical Extents)的可被寻址的基本单位。在同一个卷组中,LE的大小和PE是相同的,并且一一对应。



<![if !supportLists]>2.7.<![endif]>Linux下的LVM和AIX下的LVM



Linux下的LVM与AIX的LVM原理和实现都是类似的,不同的是:Linux下多用命令完成,而AIX下有smitty工具。并且Linux命令多是名词+动词,比如pvcreate,lvcreate,lvscan等,而AIX命令多事动词+名词,比如:createpv,createlv,createvg……



<![if !supportLists]>3.   <![endif]>工作原理



<![if !vml]><![endif]>



LVM 在每个物理卷头部都维护了一个 metadata,每个 metadata 中都包含了整个 VG 的信息,包括每个 VG 的布局配置、PV 的编号、LV 的编号,以及每个 PE 到 LE 的映射关系。同一个 VG 中的每个 PV 头部的信息是相同的,这样有利于故障时进行数据恢复。 



LVM 对上层文件系统提供 LV 层,隐藏了操作细节。对文件系统而言,对 LV 的操作与原先对 Partition 的操作没有差别。当对 LV 进行写入操作时,LVM 定位相应的 LE,通过 PV 头部的映射表,将数据写入到相应的 PE 上。 



LVM 实现的关键在于在 PE 和 LE 间建立映射关系,不同的映射规则决定了不同的 LVM 存储模型。LVM 支持多个 PV 的 Stripe 和 Mirror,这点和软 Raid 的实现十分相似。



<![if !supportLists]>4.   <![endif]>Linux下LVM管理



<![if !supportLists]>4.1.<![endif]>创建步骤



LVM的创建步骤为:创建PV,创建VG,将PV加入VG,在VG的基础上创建LV,格式化LV,挂载LV



<![if !supportLists]>4.1.1. <![endif]>创建PV



创建物理卷的基础是有物理储存设备,使用fdisk创建分区,分区的类型为8e,LVM分区。



创建pv命令



pvcreate /dev/sdb








root@insurance:/root >pvcreate /dev/sdb


 Physical volume “/dev/sdb”
successfully created




<![if !supportLists]>4.1.2. <![endif]>查看PV



创建完成pv后即可运行pvscan或者pvdisplay命令查看创建好的pv信息



pvscan如下








root@insurance:/root >pvscan


  PV /dev/sda3   VG VolGroup   lvm2 [71.80 GiB / 0    free]


  Total: 1 [71.80 GiB]
/ in use: 1 [71.80 GiB] / in no VG: 0 [0   ]




pvdisplay








root@insurance:/root >pvdisplay


  — Physical volume
—


  PV Name              
/dev/sda3


  VG Name              
VolGroup


  PV Size              
71.80 GiB / not usable 3.00 MiB


  Allocatable          
yes (but full)


  PE Size              
4.00 MiB


  Total PE             
18381


  Free PE              
0


  Allocated PE         
18381


  PV UUID              
KSa9cO-mrUW-Zs9Q-tOV4-ArfU-v0xY-c14hMv




<![if !supportLists]>4.1.3. <![endif]>创建VG



vgcreate :将 /dev/hda6-8 建立成为一个 VG,指定 PE 为 16MB








 [root@www ~]# vgcreate -s 16M vbirdvg
/dev/hda{6,7,8}  


Volume group "vbirdvg" successfully
created




<![if !supportLists]>4.1.4. <![endif]>激活VG



使vg立即生效,不需要重启








vgchange -a y vbirdvg




 



<![if !supportLists]>4.1.5. <![endif]>查看VG



vgscan








root@insurance:/root >vgscan


  Reading all physical
volumes.  This may take a while…


  Found volume group
"VolGroup" using metadata type lvm2




vgdisplay








root@insurance:/root >vgdisplay


  — Volume group —


  VG Name              
VolGroup


  System ID            


  Format               
lvm2


  Metadata Areas        1


  Metadata Sequence
No  3


  VG Access            
read/write


  VG Status            
resizable


  MAX LV               
0


  Cur LV               
2


  Open LV          
    2


  Max PV               
0


  Cur PV               
1


  Act PV               
1


  VG Size              
71.80 GiB


  PE Size              
4.00 MiB


  Total PE             
18381


  Alloc PE / Size       18381 /
71.80 GiB


  Free  PE / Size       0 /
0  


  VG UUID              
DhZF80-pzdO-SgAA-XwFu-H4Vr-NPlU-vF4jDi




 



<![if !supportLists]>4.1.6. <![endif]>创建LV



lvcreate








示例


lvcreate -i 3 -I 8 -L 100M –n lv_001 vg00              


-i
映射到几个pv,-I 条带大小 –l:LE个数,必须为-i的整数倍,-L大小,vg所使用的vg


-n为名称


Creates  a 
mirror  logical volume with
2 sides with a useable size of 500 MiB. 
This operation would require 3devices (or option –alloc anywhere) -
two for the mirror devices and one for the disk log:


 


lvcreate –m 1 -L 500M vg00


 


Creates
a mirror logical volume with 2 sides with a useable size of 500 MiB.  This operation  would  require  2 devices - the log is
"in-memory":


 


lvcreate –m 1 –mirrorlog core -L 500M vg00


 


Creates
a snapshot logical volume named /dev/vg00/snap which has access to the
contents of the original logical volume named /dev/vg00/lvol1 at snapshot
logical volume creation time. If the original logical volume  contains a  file system, you can mount the
snapshot logical volume on an arbitrary directory in order to access the
con-tents of the filesystem to run a backup while the original filesystem
continues to get updated:


 


lvcreate –size 100m –snapshot –name snap /dev/vg00/lvol1


 


Creates
a sparse device named /dev/vg1/sparse of size 1TiB with space for just under
100MiB of actual  data  on it:


 


lvcreate –virtualsize 1T –size 100M –snapshot –name sparse vg1


 


Creates  a 
linear logical volume "vg00/lvol1" using physical extents
/dev/sda:0-7 and /dev/sdb:0-7 for alloca-tion of extents:


 


lvcreate -L 64M -n lvol1 vg00 /dev/sda:0-7 /dev/sdb:0-7


 


Creates
a 5GiB RAID5 logical volume "vg00/my_lv", with 3 stripes (plus a
parity drive for a total of 4 devices) and a stripesize of 64KiB:


 


lvcreate –type raid5 -L 5G -i 3 -I 64 -n my_lv vg00


 


Creates  a 
5GiB RAID10 logical volume "vg00/my_lv", with 2 stripes on 2
2-way mirrors.  Note that the ’-i’
and ’-m’ arguments behave differently. 
The ’-i’ specifies the number of stripes.  The ’-m’ specifies the number of additional
copies.


 


lvcreate –type raid10 -L 5G -i 2 -m 1 -n my_lv vg00


 


Creates  100MiB  pool  logical  volume  for  thin provisioning build with 2 stripes
64KiB and chunk size 256KiB together with 1TiB thin provisioned logical
volume "vg00/thin_lv":


 


lvcreate -i 2 -I 64 -c 256 -L100M -T vg00/pool -V 1T –name
thin_lv




 



<![if !supportLists]>4.1.7. <![endif]>格式化并挂载LV








mkfs -t ext3 /dev/vbirdvg/vbirdlv


mkdir /mnt/lvm


mount /dev/vbirdvg/vbirdlv /mnt/lvm




 



<![if !supportLists]>4.2.<![endif]>PV管理



<![if !supportLists]>4.2.1. <![endif]>新增PV



通过fdisk命令创建LVM-Linux分区,指定分区类型为8e








[root@hn ~]# fdisk /dev/sdb#对硬盘 "/dev/sdb"分区 


输出信息如下:


……省略部分输出内容……  


Command (m for help): n #创建新分区  


Command action  


   e   extended
 


   p   primary partition (1-4)
 


p#创建主分区  


Partition number (1-4): 1#创建第一个主分区  


First cylinder (1-1044, default 1): 1#指定起始柱面  


Last cylinder or +size or +sizeM or +sizeK (1-1044,

default 1044): +100M    
#分区大小为100M  


Command (m for help): t #改变分区类型  


Selected partition 1  


Hex code (type L to list codes): 8e
 
#输入LVM分区的编号"8e"  


Changed system type of partition 1 to 8e (Linux LVM)
 


Command (m for help): p #显示分区表  


Disk /dev/sdb: 8589 MB, 8589934592 bytes
 


255 heads, 63 sectors/track, 1044 cylinders
 


Units = cylinders of 16065 * 512 = 8225280 bytes
 


   Device Boot      Start      End      Blocks   Id  System
 


/dev/sdb1          1          13      104391   8e  Linux LVM
 


Command (m for help): w #保存并退出  


The partition table has been altered!
 


Calling ioctl() to re-read partition table.
 


Syncing disks. 




partprobe更新硬盘分区表








[root@hn ~]# partprobe#更新内核中的分区表




pvcreate命令








[root@hn ~]# pvcreate /dev/sdb1#将分区初始化为物理卷 


Physical volume "/dev/sdb1" successfully created 




<![if !supportLists]>4.2.2. <![endif]>查看PV



pvscan 扫描磁盘上所有的物理卷



-d调试模式



-e仅显示属于输出卷组的物理卷



-n仅显示不属于任何卷组的物理卷



-s短格式输出



-u显示UUID



pvdisplay显示所有物理卷的信息



pvck检查物理卷元数据



<![if !supportLists]>4.2.3. <![endif]>修改PV



pvchange指令允许管理员改变物理卷的分配许可。



如果物理卷出现故障,可以使用pvchange指令禁止分配物理卷上的PE。



-u生成新的UUID -x是否允许分配PE








[root@hn ~]# pvchange -x n /dev/sdb1
 
#禁止分配"/dev/sdb1"上的PE 


Physical volume "/dev/sdb1" changed
 


1 physical volume changed / 0 physical volumes not changed 




<![if !supportLists]>4.2.4. <![endif]>删除PV



pvremove指令用于删除一个存在的物理卷。



-d调试模式



-f强制删除



-y对提问回答“yes”



使用pvremove指令删除物理卷时,它将LVM分区上的物理卷信息删除,使其不再被视为一个物理卷。








[root@hn ~]# pvremove /dev/sdb2 #删除物理卷 


Labels on physical volume "/dev/sdb2" successfully wiped 




 



<![if !supportLists]>4.3.<![endif]>VG管理



<![if !supportLists]>4.3.1. <![endif]>新增VG



vgcreate :将 /dev/hda6-8 建立成为一个 VG,指定 PE 为 16MB








 [root@www ~]# vgcreate -s 16M vbirdvg
/dev/hda{6,7,8}  


Volume group "vbirdvg" successfully
created




激活VG,使vg立即生效,不需要重启








vgchange -a y vbirdvg




 



<![if !supportLists]>4.3.2. <![endif]>查看VG



vgscan








root@insurance:/root
>vgscan


  Reading all physical volumes.  This may take a while…


  Found volume group
"VolGroup" using metadata type lvm2




vgdisplay








root@insurance:/root
>vgdisplay


  — Volume group —


  VG Name              
VolGroup


  System ID            


  Format               
lvm2


  Metadata Areas        1


  Metadata Sequence No  3


  VG Access            
read/write


  VG Status            
resizable


  MAX LV               
0


  Cur LV               
2


  Open LV              
2


  Max PV               
0


  Cur PV               
1


  Act PV               
1


  VG Size              
71.80 GiB


  PE Size              
4.00 MiB


  Total PE             
18381


  Alloc PE / Size       18381 /
71.80 GiB


  Free  PE / Size       0 /
0  


  VG UUID              
DhZF80-pzdO-SgAA-XwFu-H4Vr-NPlU-vF4jDi




 



<![if !supportLists]>4.3.3. <![endif]>向VG中添加物理卷



vgextend








[root@hn ~]# vgextend
vg2000 /dev/sdb2
 #将物理卷"/dev/sdb2"加入卷组"vg2000"


Volume group
"vg2000" successfully extended




<![if !supportLists]>4.3.4. <![endif]>从VG中删除物理卷



vgreduce








[root@hn ~]# vgreduce
vg2000 /dev/sdb2 
#将物理卷"/dev/sdb2"从卷组"vg2000"中删除 


Removed
"/dev/sdb2" from volume group "vg2000"




<![if !supportLists]>4.3.5. <![endif]>修改VG属性



vgchange



        {-a
Availability -q Quorum [-l] [-p] [-s] [VolumeGroupName… ]}



        {[-S
shareable] -c cluster VolumeGroupName}



        {[-P
parallel_nomwc_resync_count]}



<![if !supportLists]>4.3.5.1.           
<![endif]>单机环境(vgchange
–a y/n vgXX)



vgchange激活VG,使vg立即生效,不需要重启








vgchange -a y vbirdvg




vgchange去激活VG,使vg立即失效,不需要重启








vgchange -a n vbirdvg




<![if !supportLists]>4.3.5.2.           
<![endif]>集群环境(vgchange
–c y/n vgXX)



当几台主机共享一个VG时,如果在多台主机上激活VG,那么每一台主机都可能对数据进行修改,而其他的主机却不知道数据已被改变,这样数据的完整性无法保证。



所以在Cluster环境下,将共享VG的属性置为exclusive模式。这样,当一台主机已经以exclusive模式激活VG之后,在其他的主机上无法再激活这个VG,这样就保证了数据的完整性。应用VG独享方式需要安装MC/SG。



#vgchange –c y /dev/vgXX   #设置VG的exclusive属性,设置之后VG无法以vgchange –a y 激活。            # vgchange –c n /dev/vgXX  #去掉VG的exclusive属性,当然设置之后就无法用vgchange –a e来激活这个VG了。



#vgchange –a e /dev/vgXX   #以exclusive模式激活卷组,只在cluster环境下有效,需要首先vgchange
–c y /dev/vgXX



#vgchange –a n /dev/vgXX #在cluster模式下去激活一个VG,仍然是用这个命令。



 



<![if !supportLists]>4.3.5.3.           
<![endif]>共享环境(vgchange
–a s/n vgXX)



并不是所有的场合,都不允许VG同时在两台以上的主机上被激活。在应用Oracle OPS时就是一个例外。这时卷组被以一种共享的方式激活,数据的完整性由应用程序(这里当然就是Oracle OPS)来保证。



因为操作系统本身无法保证数据的完整性,所以设成共享模式激活的卷组必须使用裸设备,这样OS不会对该设备进行缓冲,而完全交给应用程序处理。



应用VG的共享方式需要安装MC/SG OPS edition。



#vgchange –c y –S y /dev/vgXX   #设置VG为共享模式,设置成功后VG只能用vgchange –a s激活,如果要用vgchange –a y激活,则必须先将VG的共享模式去掉(用vgchange –S n /dev/vgxx).  
#vgchange
–a s /dev/vgXX #以共享方式激活VG



#vgchange –a n /dev/vgXX #在共享模式下去激活方法不变



<![if !supportLists]>4.3.6. <![endif]>删除VG



vgremove删除VG








[root@hn ~]# vgremove vg1000#删除卷组"vg1000" 


Volume group "vg1000" successfully removed 




 



<![if !supportLists]>4.4.<![endif]>LV管理



<![if !supportLists]>4.4.1. <![endif]>新增LV



lvcreate








示例


lvcreate -i 3 -I 8 -L 100M –n lv_001 vg00              


-i
映射到几个pv,-I 条带大小 –l:LE个数,必须为-i的整数倍,-L大小,vg所使用的vg


-n为名称


Creates  a 
mirror  logical volume with
2 sides with a useable size of 500 MiB. 
This operation would require 3devices (or option –alloc anywhere) -
two for the mirror devices and one for the disk log:


 


lvcreate –m 1 -L 500M vg00


 


Creates
a mirror logical volume with 2 sides with a useable size of 500 MiB.  This operation  would  require  2 devices - the log is
"in-memory":


 


lvcreate –m 1 –mirrorlog core -L 500M vg00


 


Creates
a snapshot logical volume named /dev/vg00/snap which has access to the
contents of the original logical volume named /dev/vg00/lvol1 at snapshot
logical volume creation time. If the original logical volume  contains a  file system, you can mount the
snapshot logical volume on an arbitrary directory in order to access the
con-tents of the filesystem to run a backup while the original filesystem
continues to get updated:


 


lvcreate –size 100m –snapshot –name snap /dev/vg00/lvol1


 


Creates
a sparse device named /dev/vg1/sparse of size 1TiB with space for just under
100MiB of actual  data  on it:


 


lvcreate –virtualsize 1T –size 100M –snapshot –name sparse vg1


 


Creates  a 
linear logical volume "vg00/lvol1" using physical extents
/dev/sda:0-7 and /dev/sdb:0-7 for alloca-tion of extents:


 


lvcreate -L 64M -n lvol1 vg00 /dev/sda:0-7 /dev/sdb:0-7


 


Creates
a 5GiB RAID5 logical volume "vg00/my_lv", with 3 stripes (plus a
parity drive for a total of 4 devices) and a stripesize of 64KiB:


 


lvcreate –type raid5 -L 5G -i 3 -I 64 -n my_lv vg00


 


Creates  a 
5GiB RAID10 logical volume "vg00/my_lv", with 2 stripes on 2
2-way mirrors.  Note that the ’-i’
and ’-m’ arguments behave differently. 
The ’-i’ specifies the number of stripes.  The ’-m’ specifies the number of additional
copies.


 


lvcreate –type raid10 -L 5G -i 2 -m 1 -n my_lv vg00


 


Creates  100MiB  pool  logical  volume  for  thin provisioning build with 2 stripes
64KiB and chunk size 256KiB together with 1TiB thin provisioned logical
volume "vg00/thin_lv":


 


lvcreate -i 2 -I 64 -c 256 -L100M -T vg00/pool -V 1T –name
thin_lv




 



<![if !supportLists]>4.4.2. <![endif]>LV格式化并挂载








mkfs -t ext3 /dev/vbirdvg/vbirdlv


mkdir /mnt/lvm


mount /dev/vbirdvg/vbirdlv /mnt/lvm




 



<![if !supportLists]>4.4.3. <![endif]>查看LV



lvscan    扫描系统中的lv



lvdisplay      显示系统中的lv信息



<![if !supportLists]>4.4.4. <![endif]>扩展逻辑卷空间



LVM提供了方便调整逻辑卷大小的能力,扩展逻辑卷大小的命令是lvextend(或者lvresize)



#lvextend -L12G
/dev/web_document/www1



lvextend–extendinglogicalvolume"/dev/web_document/www1"to12GB



lvextend–doingautomaticbackupofvolumegroup"web_document"



lvextend–logicalvolume"/dev/web_document/www1"successfullyextended



上面的命令就实现将逻辑卷www1的大小扩招为12G。



#lvextend -L +1G
/dev/web_document/www1



lvextend–extendinglogicalvolume"/dev/web_document/www1"to13GB



lvextend–doingautomaticbackupofvolumegroup"web_document"



lvextend–logicalvolume"/dev/web_document/www1"successfullyextended



上面的命令就实现将逻辑卷www1的大小增加1G。



<![if !supportLists]>4.4.5. <![endif]>缩小逻辑卷空间



lvreduce








[root@hn ~]# lvreduce -L -50M /dev/vg1000/lvol0
 


#将逻辑卷的空间大小减少50M 


……省略部分输出内容……  


Do you really want to reduce lvol0? [y/n]: y  #确认操作  


  Reducing logical volume lvol0 to 252.00 MB
 


  Logical volume lvol0 successfully resized 




 



<![if !supportLists]>4.4.6. <![endif]>删除逻辑卷



lvremove








[root@hn ~]# lvremove /dev/vg1000/lvol0 #删除逻辑卷"lvol0" 


Do you really want to remove active logical 

volume "lvol0"? [y/n]: y    
#确认删除  


  Logical volume "lvol0" successfully removed 




 



<![if !supportLists]>4.4.7. <![endif]>修改逻辑卷大小



lvresize:使用lvresize指令调整逻辑卷空间大小和缩小空间时需要谨慎,因为它有可能导致数据丢失。








[root@hn ~]# lvresize -L +200M /dev/vg1000/lvol0
 
#将逻辑卷空间增加200M 


Extending logical volume lvol0 to 280.00 MB
 


Logical volume lvol0 successfully resized 




 



<![if !supportLists]>4.4.8. <![endif]>修改文件系统大小



修改了逻辑卷的容量以后,就需要修改文件系统大小以。



可以使用resize2fs命令(或者reiserfs工具),修改的原因是:LV是虚拟硬件层面的块,而文件系统是操作系统内核级的系统,修改了LV并不会同步到文件系统中,所以需要调用resize2fs命令同步文件系统的大小,命令格式如下:








resize2fs /dev/mapper/VolGroup-LogVol00




<![if !supportLists]>5.   <![endif]>AIX下LVM管理



AIX下的LVM管理与linux下的类似,区别在于,AIX下有smitty管理工具,在这个工具下,可以实现PV/VG/LV的创建,修改大小,激活,查看,删除等操作。只要你英文不错,原理和Linux下是类似的。



此处仅给几个简单截图演示一下:



<![if !vml]><![endif]>



<![if !vml]><![endif]>



在AIX下有smitty fs,smitty pv,smitty vg,smitty lv,smitty ha等命令,可以很便捷的以图形化的方式完成LVM管理操作。



有个秘闻需要说一下:



1989年,AIX 3.0版本首次在Unix下引入了LVM。



1998年, Heinz Mauelshagen写了Linux版本的逻辑卷管理器。



2000年12月31日,林纳斯·托瓦兹将LVM引入了Linux2.4中。



因此,他们是如此的相像,但是也有如此多的不同。