Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品与服务 | Email

第 53 章 Logical Volume Manager (LVM)

目录

53.1. 物理卷管理(physical volume)
53.1.1. pvcreate
53.1.2. pvdisplay
53.1.3. pvs
53.2. 卷组管理(Volume Group)
53.2.1. vgcreate
53.2.2. vgdisplay
53.2.3. vgs
53.2.4. vgchange
53.2.5. vgextend
53.2.6. vgreduce
53.3. 逻辑卷管理(logical volume)
53.3.1. lvcreate
53.3.1.1. snapshot
53.3.2. lvdisplay
53.3.3. lvremove
53.3.3.1. snapshot
53.4. Format
53.5. mount
53.5.1. lv
53.5.2. snapshot
53.6. snapshot backup

vg,lv命名规则,建议采用:

1. /dev/vg00/lvol00

2. /dev/VolGroup00/LogVol00

lvm 创建流程 pvcreate - vgcreate - lvcreate

# pvcreate /dev/sdb4
  Physical volume "/dev/sdb4" successfully created

# vgcreate vg1 /dev/sdb4
  Volume group "vg1" successfully created

# lvcreate -l 10239 -n lv0 vg1
  Logical volume "lv0" created
	

53.1. 物理卷管理(physical volume)

53.1.1. pvcreate

将整个硬盘划为物理卷

# pvcreate /dev/hdb
			

将单个分区创建为物理卷的命令为:

# pvcreate /dev/hda5
			

实例

# pvcreate /dev/sdb4
  Physical volume "/dev/sdb4" successfully created
			

53.1.2. pvdisplay

# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb4
  VG Name               vg1
  PV Size               1.02 TiB / not usable 4.90 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              267301
  Free PE               257062
  Allocated PE          10239
  PV UUID               g2xLQ8-7tgm-iNZc-8dVq-vo3z-CFJp-LryYAs

			

53.1.3. pvs

# pvs
  PV         VG   Fmt  Attr PSize PFree
  /dev/sdb4  vg1  lvm2 a-   1.02t 1004.15g
			
comments powered by Disqus