Resize disk partition with fdisk

fdisk -u /dev/drbd29

use -u so that the smallest unit is used to display partition boundaries.

z2-10:~# fdisk -u /dev/drbd29

The number of cylinders for this disk is set to 3916.
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): p

Disk /dev/drbd29: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0000ff61

       Device Boot      Start         End      Blocks   Id  System
/dev/drbd29p1   *        2048    40136703    20067328   83  Linux

Only do that for the last partition. Delete it, recreate it by setting the Start using the same value as the one displayed. In the example above Start and End are in 512 bytes units where Blocks are in 1024 bytes unit.

Command (m for help): d
Selected partition 1   

Command (m for help): n
Command action         
   e   extended        
   p   primary partition (1-4)
p                             
Partition number (1-4): 1     
First sector (63-62914559, default 63): 2048
Last sector, +sectors or +size{K,M,G} (2048-62914559, default 62914559): +61865983

Command (m for help): p

Disk /dev/drbd29: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes                             
Disk identifier: 0x0000ff61                                        

       Device Boot      Start         End      Blocks   Id  System
/dev/drbd29p1            2048    61868031    30932992   83  Linux 

Command (m for help): n
Command action         
   e   extended        
   p   primary partition (1-4)
p                             
Partition number (1-4): 2     
First sector (63-62914559, default 63): 61868032
Last sector, +sectors or +size{K,M,G} (61868032-62914559, default 62914559): 
Using default value 62914559                                                 

Command (m for help): p

Disk /dev/drbd29: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes                             
Disk identifier: 0x0000ff61                                        

       Device Boot      Start         End      Blocks   Id  System
/dev/drbd29p1            2048    61868031    30932992   83  Linux
/dev/drbd29p2        61868032    62914559      523264   83  Linux

The resize2fs utility can then be used against the larger partition to grow the filesystem.

resize2fs /dev/drbd29p1