在 VMWare 中增加虚拟磁盘不会显示 LVM 中有新可用空间

在 VMWare 中增加虚拟磁盘不会显示 LVM 中有新可用空间

我在 VMWare ESXi 4.1 虚拟机上将虚拟硬盘的大小从 79GB 增加到了 100GB

http://screencast.com/t/j6Y2SmLES3P7

之后我重新启动了虚拟机,但是当我进入虚拟机时

[root@linxuph53]# vgdisplay
  --- Volume group ---
  VG Name               vg_linuxph53
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               79.50 GiB
  PE Size               32.00 MiB
  Total PE              2544
  Alloc PE / Size       2544 / 79.50 GiB
  Free  PE / Size       0 / 0   
  VG UUID               Y269kC-3Jzh-hSHz-Jgwv-lkVO-K69T-mzrqaZ

我没有看到我有新的未分配空间,所以从技术上讲我无法扩展我的 /home 分区

  --- Logical volume ---
  LV Name                /dev/vg_linuxph53/lv_home
  VG Name                vg_linuxph53
  LV UUID                bWrIb2-ek2G-2G3Y-a6kA-8nnB-8fM4-6OenbJ
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                35.16 GiB
  Current LE             1125
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

有任何想法吗?

重新启动虚拟机并运行 fdisk -l 后

这就是我所看到的

  [root@linxuph53 semenov]# fdisk -l

  Disk /dev/sda: 107.4 GB, 107374182400 bytes
  255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x00074e78

     Device Boot      Start         End      Blocks   Id  System
  /dev/sda1   *        2048     1026047      512000   83  Linux
  /dev/sda2         1026048   167772159    83373056   8e  Linux LVM

  Disk /dev/dm-0: 41.3 GB, 41305505792 bytes
  255 heads, 63 sectors/track, 5021 cylinders, total 80674816 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x00000000

  Disk /dev/dm-0 doesn't contain a valid partition table

  Disk /dev/dm-1: 6308 MB, 6308233216 bytes
  255 heads, 63 sectors/track, 766 cylinders, total 12320768 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x00000000

  Disk /dev/dm-1 doesn't contain a valid partition table

  Disk /dev/dm-2: 37.7 GB, 37748736000 bytes
  255 heads, 63 sectors/track, 4589 cylinders, total 73728000 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x00000000

  Disk /dev/dm-2 doesn't contain a valid partition table

谢谢,德米特里

答案1

您可能需要重新启动虚拟机才能重新读取分区表。您可以尝试该partprobe命令,看看输出是否发生了变化fdisk -l,但重新启动肯定可以解决问题。

相关内容