LVM 无法为镜像日志分配盘区

LVM 无法为镜像日志分配盘区

我在创建镜像 LV 时遇到一个已知问题。

# lvcreate --type mirror -l 100%FREE -m1 t1_VG1 -n t1_db01_lv /dev/mapper/t1_db01_rz1 /dev/mapper/t1_db01_gc
Insufficient free space for log allocation for logical volume.
Unable to allocate extents for mirror log.

我知道一个PE不足以记录日志,但我不明白为什么。在同一系统上,它与其他 PV 一起工作没有问题......(见下文)

我不想将镜像日志写入系统。所以 --corelog 对我来说不是一个选择。

我希望你可以帮助我。

# vgdisplay t1_VG1
  --- Volume group ---
  VG Name               t1_VG1
  System ID
  Format                lvm2
  Metadata Areas        12
  Metadata Sequence No  16
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                12
  Act PV                12
  VG Size               2.87 TiB
  PE Size               4.00 MiB
  Total PE              753380
  Alloc PE / Size       0 / 0
  Free  PE / Size       753380 / 2.87 TiB
  VG UUID               ####


# pvdisplay /dev/mapper/t1_db01_1
  --- Physical volume ---
  PV Name               /dev/mapper/t1_db01_1
  VG Name               t1_VG1
  PV Size               <298.02 GiB / not usable 4.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              76292
  Free PE               76292
  Allocated PE          0
  PV UUID               ####

# pvdisplay /dev/mapper/t1_db01_2
  --- Physical volume ---
  PV Name               /dev/mapper/t1_db01_2
  VG Name               t1_VG1
  PV Size               <298.02 GiB / not usable 4.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              76292
  Free PE               76292
  Allocated PE          0
  PV UUID               #####
  
# vgs -o +vg_free_count,vg_extent_count
  VG              #PV #LV #SN Attr   VSize    VFree    Free    #Ext
  t1_VG1           12   0   0 wz--n-    2.87t    2.87t  753380  753380

---------------- 其他PV ------------------

# lvcreate --type mirror -l 100%FREE -m1 newVG -n newLV /dev/mapper/mpathbf /dev/mapper/mpathbg
  Logical volume "newLV" created.


# vgs -o +vg_free_count,vg_extent_count
  newVG            2   1   0 wz--n-    9.30g    4.00m       1    2382

# lvdisplay -m /dev/newVG/newLV
  --- Logical volume ---
  LV Path                /dev/newVG/newLV
  LV Name                newLV
  VG Name                newVG
  LV UUID                #####
  LV Write Access        read/write
  LV Creation host, time lxtsmtest1, 2022-02-04 11:20:00 +0100
  LV Status              available
  # open                 0
  LV Size                <4.65 GiB
  Current LE             1190
  Mirrored volumes       2
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:13

  --- Segments ---
  Logical extents 0 to 1189:
    Type                mirror
    Monitoring          monitored
    Mirrors             2
    Mirror size         1190
    Mirror log volume   newLV_mlog
    Mirror region size  2.00 MiB
    Mirror original:
      Logical volume    newLV_mimage_0
      Logical extents   0 to 1189
    Mirror destinations:
      Logical volume    newLV_mimage_1
      Logical extents   0 to 1189

相关内容