加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – pvresize在增加底层块设备的大小后似乎没有调整大小

发布时间:2020-12-13 18:27:48 所属栏目:Linux 来源:网络整理
导读:我增加了我用作LVM PV的分区大小,但运行pvresize似乎没有看到额外的空间: cuttle:~# fdisk -l /dev/vdaDisk /dev/vda: 21.5 GB,21474836480 bytes255 heads,63 sectors/track,2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (
我增加了我用作LVM PV的分区大小,但运行pvresize似乎没有看到额外的空间:
cuttle:~# fdisk -l /dev/vda

Disk /dev/vda: 21.5 GB,21474836480 bytes
255 heads,63 sectors/track,2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00027dbb

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *           1          31      248976   83  Linux
/dev/vda2              32        2610    20715817+  8e  Linux LVM

其中说vda2约为20gig

cuttle:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/vda2
  VG Name               debian
  PV Size               4.76 GiB / not usable 3.08 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              1217
  Free PE               0
  Allocated PE          1217
  PV UUID               tehZic-5vfN-rsrm-B8lN-lpgc-yQT1-ioH1V0

所以目前的pv约为4-5演出

cuttle:~# pvresize -v /dev/vda2
    Using physical volume(s) on command line
    Archiving volume group "debian" metadata (seqno 12).
    No change to size of physical volume /dev/vda2.
    Resizing volume "/dev/vda2" to 9975981 sectors.
    Updating physical volume "/dev/vda2"
    Creating volume group backup "/etc/lvm/backup/debian" (seqno 13).
  Physical volume "/dev/vda2" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized

pvresize说“物理卷大小/ dev / vda2没有变化”

cuttle:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/vda2
  VG Name               debian
  PV Size               4.76 GiB / not usable 3.08 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              1217
  Free PE               0
  Allocated PE          1217
  PV UUID               tehZic-5vfN-rsrm-B8lN-lpgc-yQT1-ioH1V0

并且光伏的大小没有改变.

不知道我还可以做些什么来使用额外的空间.我想我可以将分区大小调整为pv的大小,然后添加第二个分区,但在我看来,我在这里尝试做的事情应该可行.

解决方法

partprobe / dev / vda

man partprobe

NAME
partprobe – inform the OS of partition table changes

SYNOPSIS partprobe [-d] [-s] [devices…]

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读