在vmware上添加虚拟磁盘空间

我有一个VMWare Server 3.5系统和2个虚拟机。 在一个启动虚拟机,我把磁盘大小从1TB改为1.5TB。 但是虚拟机没有看到任何新的未分配的空间,所以我重新启动两次服务器。 但没有发生任何事情… guest上的操作系统是CENTOS,两个磁盘是LVM。 fdisk看到新的空间…但磁盘上没有分区.. lvm没有看到任何可用空间…

[root@srv-archive ~]# dmesg |grep sdb sd 2:0:1:0: [sdb] 3145728000 512-byte logical blocks: (1.61 TB/1.46 TiB) sd 2:0:1:0: [sdb] Write Protect is off sd 2:0:1:0: [sdb] Mode Sense: 61 00 00 00 sd 2:0:1:0: [sdb] Cache data unavailable sd 2:0:1:0: [sdb] Assuming drive cache: write through sd 2:0:1:0: [sdb] Cache data unavailable sd 2:0:1:0: [sdb] Assuming drive cache: write through sdb: sda1 sda2 sd 2:0:1:0: [sdb] Cache data unavailable sd 2:0:1:0: [sdb] Assuming drive cache: write through sd 2:0:1:0: [sdb] Attached SCSI disk dracut: Scanning devices sda2 sdb for LVM logical volumes vg_srvarchive/lv_swap vg_srvarchive/lv_root 

和fdisk

  # fdisk -l /dev/sdb Disco /dev/sdb: 1610.6 GB, 1610612736000 byte 255 testine, 63 settori/tracce, 195812 cilindri Unità = cilindri di 16065 * 512 = 8225280 byte Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Identificativo disco: 0x00000000 

以下是您可以看到0个可用空间的pvdisplay:

 # pvdisplay --- Physical volume --- PV Name /dev/sdb VG Name vg_archive PV Size 1000,00 GiB / not usable 4,00 MiB Allocatable yes (but full) PE Size 4,00 MiB Total PE 255999 Free PE 0 Allocated PE 255999 PV UUID 3Qftxe-rpff-TjTA-9CA4-BoeM-qEgc-RzSzXL 

我只想扩大我的LVM设备..非常感谢欢呼luigi

你可能想尝试一种不同的方法:

  - Power down the VM - Create a new disk for the VM using the VMWARE control panel with the additional size you want - do a pvcreate on the new disk - do a vgextend adding the new disk - then you can do whatever lvextend you need. - REMEMBER the filesystems will need to be extended as well. 

你有没有尝试pvresize /dev/sdb ? 这是因为你的磁盘大小改变了,但lvm还不知道。