lvm 相关操作

1. create

pvcreate 
vgcreate  
lvcreate -L 1G(+1G) -n  

 

2. resize

pvcreate 
vgextend  
lvresize -L 2G(+1G) ->
xfs_growfs 

 

3. LVM 相关指令

+---------------------+-----------+-----------+--------------------+
|          任务       |  PV 阶段  |  VG 阶段  |      LV 阶段       |
+---------------------+-----------+-----------+--------------------+
| 搜寻(scan)          | pvscan    | vgscan    | lvscan             |
+---------------------+-----------+-----------+--------------------+
| 建立(create)        | pvcreate  | vgcreate  | lvcreate           |
+---------------------+-----------+-----------+--------------------+
| 列出(display)       | pvdisplay | vgdisplay | lvdisplay          |
+---------------------+-----------+-----------+--------------------+
| 增加(extend)        |           | vgextend  | lvextend(lvresize) |
+---------------------+-----------+-----------+--------------------+
| 减少(reduce)        |           | vgreduce  | lvreduce(lvresize) |
+---------------------+-----------+-----------+--------------------+
| 删除(remove)        | pvremove  | vgremove  | lvremove           |
+---------------------+-----------+-----------+--------------------+
| 改变容量(resize)    |           |           | lvresize           |
+---------------------+-----------+-----------+--------------------+
| 改变属性(attribute) | pvchange  | vgchange  | lvchange           |
+---------------------+-----------+-----------+--------------------+

 

你可能感兴趣的:(lvm 相关操作)