1) view inventory:
check free space: df -h
check inode usage: df -i
show partition size: fdisk -s /dev/sda3
2) increase vmdk in vmware
3) reboot
4) check fdisk output:

gentoo01-2 saygak # fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 7516 MB, 7516192768 bytes
255 heads, 63 sectors/track, 913 cylinders, total 14680064 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: 0x7ff66574

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 107856 52904+ 83 Linux
/dev/sda2 107857 614376 253260 82 Linux swap / Solaris
/dev/sda3 614377 12582911 5984267+ 83 Linux


new size is 7516mb. 3d parttion has 5984267 blocks and we need to extend /dev/sda3.

5) Resize partition (remove old partition and create new).

Command (m for help): d
Partition number (1-4): 3

Command (m for help): n
Partition type:
p primary (2 primary, 0 extended, 2 free)
e extended
Select (default p): p
Partition number (1-4, default 3): 3
First sector (614377-14680063, default 614377): 614377
Last sector, +sectors or +size{K,M,G} (614377-14680063, default 14680063): 14680063

Command (m for help): p

Disk /dev/sda: 7516 MB, 7516192768 bytes
255 heads, 63 sectors/track, 913 cylinders, total 14680064 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: 0x7ff66574

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 107856 52904+ 83 Linux
/dev/sda2 107857 614376 253260 82 Linux swap / Solaris
/dev/sda3 614377 14680063 7032843+ 83 Linux

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: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.


New partition has 7032843 blocks, but we need to reboot before making changes.

6) Extend filesystem now.

gentoo01-2 saygak # partx -s /dev/sda
NR START END SECTORS SIZE NAME UUID
1 2048 107856 105809 51.7M
2 107857 614376 506520 247.3M
3 614377 14680063 14065687 6.7G

now kernel know about disk partitioning. and we can continue with extending filesystem:

gentoo01-2 saygak # resize2fs /dev/sda3
resize2fs 1.42 (29-Nov-2011)
Filesystem at /dev/sda3 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/sda3 to 1758210 (4k) blocks.
The filesystem on /dev/sda3 is now 1758210 blocks long.

7) check new fs size and amount of inodes with df -h and df -i.
that’s all.