第 4 章 用 CLI 命令管理 LVM
		本章总结了您可使用 LVM 命令行界面(CLI)来创建和维护逻辑卷的独立管理任务。
	
注意
			If you are creating or modifying an LVM volume for a clustered environment, you must ensure that you are running the 
clvmd daemon. For information, see see 第 3.1 节 “在群集中创建 LVM 卷”.
		4.1. 使用 CLI 命令 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
			LVM CLI 命令有一些通用的特性。
		
			当在命令行中需要容量参数时,可以明确指定单位。如果您不指定单位,那么就使用默认的 KB 或者 MB。LVM CLI 不接受分数。
		
			在命令行参数中为 LVM 指定单位时要无需区分大小写,比如 M 或者 m 的效果是一样的,且使用 2 的乘方(乘 1024)。但是,在某个命令中指定 
--units 参数时,小写表示该单位乘 1024,而大写表示该单位乘 1000。
		
			在命令使用卷组或者逻辑卷名称作为参数时,完整路径名称是可选项。卷组 
vg0 中的逻辑卷 lvol0 可被指定为 vg0/lvol0。如果空置需要指定卷组的地方,就会代入所有列出的卷组。在需要指定一组逻辑卷的地方给出了卷组,就会代入那个卷组中的列出的逻辑卷。例如:lvdisplay vg0 命令将显示卷组 vg0 中的所有逻辑卷。
		
			所有 LVM 命令都接受 
-v 参数,它可多次输入来提高输出的详细程度。例如:以下示例显示的是 lvcreate 命令的默认输出。
		lvcreate -L 50MB new_vg
# lvcreate -L 50MB new_vg
  Rounding up size to full physical extent 52.00 MB
  Logical volume "lvol0" created
			下面是 
lvcreate 命令带 -v 参数的输出。
		
			您还可以使用 
-vv、-vvv 或者 -vvvv 参数来提高命令执行的详细程度。-vvvv 参数可以提供最多的信息。以下是  lvcreate 命令带 -vvvv 参数时给出的输出的前几行。
		
			您可以用命令的 
--help 参数来显示任意 LVM CLI 命令的帮助信息。
		commandname --help
commandname --help
			要显示某个命令的 man page,请执行 
man 命令:
		man commandname
man commandname
man lvm 命令提供有关 LVM 的常规在线信息。
		
			All LVM objects are referenced internally by a UUID, which is assigned when you create the object. This can be useful in a situation where you remove a physical volume called 
/dev/sdf which is part of a volume group and, when you plug it back in, you find that it is now /dev/sdk. LVM will still find the physical volume because it identifies the physical volume by its UUID and not its device name. For information on specifying the UUID of a physical volume when creating a physical volume, see see 第 6.4 节 “修复物理卷元数据”.