查看挂载根目录是否为逻辑卷(系统默认挂载根目录方式:逻辑卷)
[root@hadoop2 cloudera-manager]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_hadoop2-lv_root
18G 17G 0 100% /
tmpfs 932M 4.0K 932M 1% /dev/shm
/dev/sda1 477M 42M 411M 10% /boot
如果是 /dev/mapper/... 表示逻辑卷,/dev/sda*:直接挂载物理盘
步骤:
1.在虚拟机关机的情况下,点击需要扩容的虚拟机设置
点击右下角扩展:填写的数字需要比现在的磁盘大小要大;
2.开启虚拟机,查看磁盘大小 与扩容前大小不一致说明扩容成功
[root@hadoop2 ~]# fdisk -l
Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 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: 0x0001f66e
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2