Notes on resizing SD card data partition 
- copy a small (2 GB) virtual disk image to a larger SD card
- resize the data partition to use the target disk capacity

# Copy Virtual (2G) SD card to real (4G) SD card:
$ sudo dd if=/dev/sda of=/dev/sdd bs=1M 
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 368.537 s, 5.8 MB/s

# Original 2G sdcard image partitioning:

Disk /dev/sdd: 3904 MB, 3904897024 bytes
121 heads, 62 sectors/track, 1016 cylinders, total 7626752 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: 0x9006ae65

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *        2048      133119       65536    c  W95 FAT32 (LBA)
/dev/sdd2          133120     3205119     1536000   83  Linux
/dev/sdd3         3205120     4194303      494592   83  Linux

# resize data partition (sdd3):

Disk /dev/sdd: 3904 MB, 3904897024 bytes
121 heads, 62 sectors/track, 1016 cylinders, total 7626752 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: 0x9006ae65

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *        2048      133119       65536    c  W95 FAT32 (LBA)
/dev/sdd2          133120     3205119     1536000   83  Linux
/dev/sdd3         3205120     7626751     2210816   83  Linux

make ext3 filesystem:
sudo mke2fs -c -j -t ext3 -v -L xfdata /dev/sdd3
sudo /sbin/mke2fs -t ext4 -j -L xfdata -O large_file /dev/sdd3