搜索

6.7. 逻​​​​​​​辑​​​​​​​卷​​​​​​​没​​​​​​​有​​​​​​​足​​​​​​​够​​​​​​​的​​​​​​​可​​​​​​​用​​​​​​​扩​​​​​​​展​​​​​​​

download PDF
You may get the error message "Insufficient free extents" when creating a logical volume when you think you have enough extents based on the output of the vgdisplay or vgs commands. This is because these commands round figures to 2 decimal places to provide human-readable output. To specify exact size, use free physical extent count instead of some multiple of bytes to determine the size of the logical volume.
在​​​​​​​默​​​​​​​认​​​​​​​情​​​​​​​况​​​​​​​下​​​​​​​,vgdisplay 命​​​​​​​令​​​​​​​的​​​​​​​输​​​​​​​出​​​​​​​结​​​​​​​果​​​​​​​提​​​​​​​示​​​​​​​可​​​​​​​用​​​​​​​物​​​​​​​理​​​​​​​扩​​​​​​​展​​​​​​​的​​​​​​​行​​​​​​​。​​​​​​​
# vgdisplay
  --- Volume group ---
  ...
  Free  PE / Size       8780 / 34.30 GB
另​​​​​​​外​​​​​​​,您​​​​​​​可​​​​​​​以​​​​​​​使​​​​​​​用​​​​​​​ vgs 的​​​​​​​ vg_free_count 和​​​​​​​ vg_extent_count 选​​​​​​​项​​​​​​​显​​​​​​​示​​​​​​​可​​​​​​​用​​​​​​​扩​​​​​​​展​​​​​​​和​​​​​​​扩​​​​​​​展​​​​​​​的​​​​​​​总​​​​​​​数​​​​​​​。​​​​​​​
[root@tng3-1 ~]# vgs -o +vg_free_count,vg_extent_count
  VG     #PV #LV #SN Attr   VSize  VFree  Free #Ext
  testvg   2   0   0 wz--n- 34.30G 34.30G 8780 8780
您​​​​​​​有​​​​​​​ 8780 个​​​​​​​可​​​​​​​用​​​​​​​物​​​​​​​理​​​​​​​扩​​​​​​​展​​​​​​​,您​​​​​​​可​​​​​​​以​​​​​​​运​​​​​​​行​​​​​​​以​​​​​​​下​​​​​​​命​​​​​​​令​​​​​​​,使​​​​​​​用​​​​​​​小​​​​​​​写​​​​​​​ l 选​​​​​​​项​​​​​​​使​​​​​​​用​​​​​​​扩​​​​​​​展​​​​​​​而​​​​​​​不​​​​​​​是​​​​​​​字​​​​​​​节​​​​​​​作​​​​​​​为​​​​​​​单​​​​​​​位​​​​​​​:
# lvcreate -l8780 -n testlv testvg
这​​​​​​​样​​​​​​​就​​​​​​​会​​​​​​​使​​​​​​​用​​​​​​​卷​​​​​​​组​​​​​​​中​​​​​​​的​​​​​​​所​​​​​​​有​​​​​​​可​​​​​​​用​​​​​​​扩​​​​​​​展​​​​​​​。​​​​​​​
# vgs -o +vg_free_count,vg_extent_count
  VG     #PV #LV #SN Attr   VSize  VFree Free #Ext
  testvg   2   1   0 wz--n- 34.30G    0     0 8780
Alternately, you can extend the logical volume to use a percentage of the remaining free space in the volume group by using the -l argument of the lvcreate command. For information, see 第 4.4.1.1 节 “创​​​​​​​建​​​​​​​线​​​​​​​性​​​​​​​卷​​​​​​​”.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.