pvs/vgs/lvs 和块设备大小不匹配

pvs/vgs/lvs 和块设备大小不匹配

我有一个 LV,上面有一个文件系统。此文件系统后面的 LUN 已在 SAN 上增长,PV、VG 和 LV 也是如此。

但是块设备似乎不匹配,所以我的resize2fs失败了。

我之前从来没见过这种情况,这是怎么回事?

我正在使用 Oracle Linux 6.5

# rpm -qa | egrep 'mdadm|lvm'
mdadm-3.2.5-4.el6_4.3.x86_64
lvm2-2.02.98-9.el6_4.3.x86_64
lvm2-libs-2.02.98-9.el6_4.3.x86_64

旧尺寸为 30G。新尺寸为 45G

# pvs
  PV         VG         Fmt  Attr PSize   PFree
  /dev/md0   vg_app   lvm2 a--   45.00g       0

# vgs
  VG         #PV #LV #SN Attr   VSize   VFree
  vg_app     1   1   0 wz--n-  45.00g       0

# lvs
  LV       VG         Attr      LSize  Pool Origin Data%  Move Log Cpy%Sync Convert
  lv_app vg_app   -wi-ao--- 45.00g

# vgdisplay vg_app
  --- Volume group ---
  VG Name               vg_app
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  9
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               45.00 GiB
  PE Size               4.00 MiB
  Total PE              11519
  Alloc PE / Size       11519 / 45.00 GiB
  Free  PE / Size       0 / 0
  VG UUID               McCXhj-nUuJ-ojpD-mnkc-2foM-oxnJ-mIb9pW

# lvdisplay /dev/vg_app/lv_app
  --- Logical volume ---
  LV Path                /dev/vg_app/lv_app
  LV Name                lv_app
  VG Name                vg_app
  LV UUID                Mx0rhZ-PnmL-cb3H-iF81-hs0u-20Zj-X5IUme
  LV Write Access        read/write
  LV Creation host, time ,
  LV Status              available
  # open                 1
  LV Size                45.00 GiB
  Current LE             11519
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

# blockdev --getsize64 /dev/vg_app/lv_app
31138512896

# blockdev --rereadpt /dev/vg_app/lv_app
BLKRRPART: Invalid argument
#

相关内容