You may be knowing these things but in case i'm explaining them a bit.
when you partition a hard drive you can have the following combinations:
1 primary + 1 extended + several logical drives in extended ( logical always resides inside extended)
2 primary + 1 extended + logical in extended
3 primary + 1 extended + logical in extended
4 primary ( in this case you won't have exteded hence no logical)
so you have 3rd combination i.e 3 primary and 1 extended
/dev/hda1 * 17 526 : 1st primary
/dev/hda2 527 3586 : extended
/dev/hda3 3587 4415 : 2nd primary
/dev/hda4 4416 4448 : 3rd primary
/dev/hda5 527 1546 : logical
/dev/hda6 1547 2566 : logical
/dev/hda7 2567 3586 : logical
now see 17-526 + 527-3586 + 3587-4415 + 4416-4448
here you haven't included rest of 4 gb space hence won't be able to utilize that.
you should have included that as part of extended. As logical can't exist without extended so you can't use that.
you have do something like what GrueMaster has suggested.