ESXI 4.1 Linux虚拟机调整扩充磁盘大小
首先调整磁盘大小为60G
点确定后,重启虚拟机OS
[root@download1 ~] shutdown -r now
[root@download1 ~]fdisk -l
Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+ 8e Linux LVM
[root@download1 ~]# df -hl
文件系统 容量 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
19G 12G 6.4G 64% /
/dev/sda1 99M 20M 75M 21% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
[root@download1 ~]# fdisk /dev/sda
The number of cylinders for this disk is set to 7832.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (2611-7832, default 2611): 默认回车
Using default value 2611
Last cylinder or +size or +sizeM or +sizeK (2611-7832, default 7832):默认回车
Using default value 7832
Command (m for help): t
Partition number (1-4): 3
Hex code (type L to list codes): 8e
Changed system type of partition 3 to 8e (Linux LVM)
Command (m for help): p
Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+ 8e Linux LVM
/dev/sda3 2611 7832 41945715 8e Linux LVM
Command (m for help): w 保持退出
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
重启虚拟机OS
[root@download1 ~]# shutdown -r now
[root@download1 ~]fdisk -l
Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+ 8e Linux LVM
/dev/sda3 2611 7832 41945715 8e Linux LVM
[root@download1 ~]# df -hl
文件系统 容量 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
19G 12G 6.4G 64% /
/dev/sda1 99M 20M 75M 21% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
[root@download1 ~]# df -T /dev/sda1
文件系统 类型 1K-块 已用 可用 已用% 挂载点
/dev/sda1 ext3 101086 19487 76380 21% /boot