1. 使用vmware安装目录中的vmware-vdiskmanager工具增加空间
D:/Program Files/VMware Workstation>vmware-vdiskmanager.exe -x 28GB "F:/My Virtu
al Machines/ubuntu-lucid/ubuntu-lucid.vmdk"
2. 然后使用工具gparted-live-0.6.2-2.iso,将新扩展的磁盘空间加到extend partition,格式化为一个新的logical partition
3. 最后挂载该分区
sudo fdisk –l
Disk /dev/sda: 30.1 GB, 30064771072 bytes
255 heads, 63 sectors/track, 3655 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: 0x00042a50
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1495 12002304 83 Linux
/dev/sda2 1495 3656 17355777 5 Extended
/dev/sda5 1495 1567 577536 82 Linux swap / Solaris
/dev/sda6 1567 3656 16777216 83 Linux
sudo blkid -o value -s UUID
sudo blkid
/dev/sda1: UUID="30750c2a-b91c-483e-afc1-c4228dc7706f" TYPE="ext4"
/dev/sda5: UUID="1af93f74-61e6-4dcd-b352-3f55667068b4" TYPE="swap"
/dev/sda6: UUID="5d007558-19ed-4167-99b4-bf73bd0d8211" TYPE="ext4"
sudo vi /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=30750c2a-b91c-483e-afc1-c4228dc7706f / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=1af93f74-61e6-4dcd-b352-3f55667068b4 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
# /dev/sda6 was on /mnt/sda6
UUID=5d007558-19ed-4167-99b4-bf73bd0d8211 /mnt/sda6 ext4 defaults 0 0
4. 重启后查看是否挂载成功
mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sda6 on /mnt/sda6 type ext4 (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)