【问题标题】:LVM Thinpool - How to resize a thinpool LV?LVM Thinpool - 如何调整 Thinpool LV 的大小?
【发布时间】:2016-11-11 17:47:09
【问题描述】:

我有以下设置:

在 Red Hat Gluster Server 上具有一个精简池和一个逻辑卷的硬件 RAID 上超过 12 个驱动器的 LVM 卷组。它看起来如下:

root@server:pts/1 - [17:33]
~ % pvs
  PV         VG  Fmt  Attr PSize  PFree
  /dev/sdb   vg0 lvm2 a--  36.38t    0

root@server:pts/1 - [17:34]
~ % vgs
  VG  #PV #LV #SN Attr   VSize  VFree
  vg0   1   2   0 wz--n- 36.38t    0

root@server:pts/1 - [17:34]
~ % lvs
  LV      VG  Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  gluster vg0 Vwi-aot--- 30.02t tp0         7.06
  tp0     vg0 twi-aot--- 36.35t             5.83   0.36

现在与谷歌搜索一样棘手的部分我没有得到任何解决方案。我想调整虚拟大小为 30 TB 的精简池中的 LV“gluster”的大小。我尝试了所有扩展和调整大小功能,但在 LVM 的手册页中没有看到任何内容。那么也许您知道如何在这里提供帮助?

【问题讨论】:

    标签: filesystems lvm glusterfs


    【解决方案1】:

    您可以如下调整精简池逻辑卷的大小,使其从 30TB 调整为 35TB:

    lvextend -L 35T vg0/gluster
    

    此信息在man lvmthin:

    中找到
       Manually manage free data space of thin pool LV
    
           The available free space in a thin pool LV can be displayed with the lvs command.  Free space can be added by extending the thin pool LV.
    
           Command to extend thin pool data space:
           lvextend -L Size VG/ThinPoolLV
    
           Example
           1. A thin pool LV is using 26.96% of its data blocks.
           # lvs
             LV    VG           Attr       LSize   Pool  Origin Data%
             pool0 vg           twi-a-tz--  10.00g               26.96
    
           2. Double the amount of physical space in the thin pool LV.
           # lvextend -L+10G vg/pool0
    
           3. The percentage of used data blocks is half the previous value.
           # lvs
             LV    VG           Attr       LSize   Pool  Origin Data%
             pool0 vg           twi-a-tz--  20.00g               13.48
    
           Other methods of increasing free data space in a thin pool LV include removing a thin LV and its related snapsots, or running fstrim on the file system using a thin LV.
    

    【讨论】:

    • 另外请记住 - 如果您扩展 VG(即:投入一些 HDD/SSD 空间),您必须先按照扩展 VG 容量的比率扩展精简池元数据,请参阅link
    猜你喜欢
    • 2019-08-30
    • 2022-11-11
    • 2020-07-23
    • 1970-01-01
    • 2015-11-19
    • 1970-01-01
    • 2014-01-01
    • 1970-01-01
    • 2011-10-01
    相关资源
    最近更新 更多