1

Topic: Empty Space Before/After Partitions

Alright, this is something that has been bugging me for quite some time and I'd like to get some clarification.

I used to have an older version of Parted Magic, version 4.3 or so from 2009, the only alignment option for partitioning was to round to cylinders. I'd leave that enabled and it was fairly easy to fill an entire drive (I mean, come on, the majority of the time that's what I do, I'll wipe the hard drive by deleting all its partitions and just make one huge one to fill it...)
Before I learned about Parted Magic, I would use Ubuntu 9.04 and open up Partition Editor (it's just GParted), and this acted the same way. Probably the same version of GParted considering when both were released.

When I started using the newer builds, starting around 6.0 and anything newer, I noticed there are now 2 alignment options, cylinders and "MiB". Doing this, when I go to create a new partition on any hard drive, flash drive, anything... it always shows 1MB unallocated before the partition begins, and I can't get rid of it. I realize 1MB is insignificant compared to the whole, but it bugs me regardless. And what's worse (this is what strayed me away from the newest versions until now), half the time if I just leave it as-is (meaning it fills the drive and has that 1MB header), it'll say the operation failed and won't work. I have to make it much smaller, then move and resize the partition. Way more work than it needs to be.

Now here's the kicker. I partitioned a flash drive (filled the entire thing) using my older burned CD, and then tried in a newer version... it now shows an empty 1MB *after* the partition on the far right. I was able to resize it which fixed it for that version... then trying on the newest (02/29/12) build, it showed a 1.7MB or so empty space after the partition. Still has that problem, on my flash drive, with any of the alignment options - it errors out immediately and I have to make a tiny partition in the center, then move it over and expand it.

So my question is: What's up with this empty space? I take it none of these are 100% filling the drive all the way to the brim? I know Windows is absolutely terrible at this and will leave like 8MB or more before and after partitions, which is why I switched to GParted instead. I really love Parted Magic for partitioning hard drives, but I'd like to know what's causing these differences in each version and why it's doing that. For now I'm sticking to version 4.3 just because it doesn't error out every time I try to make a partition... you can imagine how incredibly frustrating it is when time and time again on any computer I try this on, it just gives me an error after 10 seconds and says the operation failed.

I posted this on the Parted Magic forums and they told me to ask here, since it's a GParted issue.  Hence why I'm asking here.

2

Re: Empty Space Before/After Partitions

Following is a list of differences to help you understand what is occuring:

GParted versions < 0.6.0 default to Cylinder alignment.
GParted versions >= 0.6.0 default to MiB alignment.

Old operating systems will only work with cylinder alignment.
New operating systems will work with both.

Old drives (small), actually matched the cylinders/heads/sectors (CHS) reported by the drive.
New drives (large), fake this value so there is no performance gained by trying to align to cylinders.
With new drives, especially solid-state drives, the performance is much better with MiB alignment than the old simulated cylinder alignment.

Old versions of GParted did not display free space less less than one cylinder (about 8 MB)
New versions of GParted do not display free space less than 1 MiB (1024 x 1024 bytes)

Free space (unallocated) must be left on the drive to store the structure used for the partition table.  Hence you will always have "free space" on a drive, even if the drive is fully used.  In the case of an MSDOS partition table, space must be reserved for the Master Boot Record, and also for each Extended Boot Record in front of each logical partition.

To maximize space usage, you should stick to one partition alignment scheme per disk device.
If you use old operating systems you should use cylinder alignment.
If you use new operating systems you should use MiB alignment.

On a different note, if you are experiencing problems with GParted, then can search the bug database to see if the problem has already been reported.  If not then opening a new bug report begins the process to resolve the problem.

Perhaps you have run into the following bug?
Bug 664050 - Unable to resize extended partition

3

Re: Empty Space Before/After Partitions

It's not so much a problem when resizing, as much as it's a problem when creating a partition.

I usually do NTFS partitions, being a Windows user... and I'll leave all the settings alone - as in, 1MiB at the very beginning, and letting the partition fill the entire drive.  I leave the Round to MiB option alone and set it to NTFS... Go to apply it and it errors.
It'll do this with FAT32 as well.  The only way I was able to get it to work was to make a small (like 50MB) partition somewhere in the middle of the drive, apply it, then move it all the way to the beginning and extend it to fill the drive.  But I shouldn't need to do that.

Also, when you say old operating systems... how old? Will Windows XP work with MiB alignment? What's the oldest that supports it?

Now, here's where I'm a bit confused.  I traditionally used to use Windows XP setup discs to partition hard drives, since it was relatively easy, assuming the drive has been wiped (using DBAN or a similar tool), you just select the drive and tell it to format.  However, GParted would show about 8MB at the end of the drive that's unallocated - and in fact, I've noticed that the Windows disc itself will show the same thing if you re-run the setup after installing it.

So let me get this straight.  There is always empty space on a drive regardless? Like, it's physically impossible to fill 100% of the space?  Even if that space is less than 1MB, which the newer versions don't display?
I guess your explanation about the MBR makes sense, because when I'd create a partition with 1MiB of space before it (as it defaults to), after applying, it would disappear.  And it would appear to fill the drive.  (This is on those rare occasions when it DOES work)

The other confusing bit is when I partition drives using the old vs. new versions of GParted... if I use the old one first, then the new, it will show empty space at the end. If I resize it to fill that empty space at the end, then open it with the old, it'll show empty space at the beginning.  If I resize it again, it'll be empty space at the end.  The cycle continues.  It's like it's impossible to fill it in both versions.

Now, for solid-state medium (e.g. flash drives) which are the majority of what I'm partitioning... it makes more sense to use the newer versions of GParted, round to MiB, and 'fill' the drive that way?  It will still show empty space before it in the older versions, which made me a bit weary since the older ones always worked fine for me... despite flash drives not having cylinders at all.

4

Re: Empty Space Before/After Partitions

Windows XP will work with MiB alignment, but the default for WinXP is to use Cylinder alignment.

DOS and windows versions based on DOS require cylinder alignment.

Are you mixing alignment types on the drive?

Also if you can come up with a series of steps that reproduce the problem you encounter, then that would help.  It is hard to fix a problem when I am unable to recreate the problem.

5

Re: Empty Space Before/After Partitions

Well, that would explain why XP shows ~8MB of empty space at the end of the drive, right?

Though Windows 7 seems to do the same thing, and that's much newer.  And sure, I'll try to get a video later, that's probably more useful than steps.

6

Re: Empty Space Before/After Partitions

drfsupercenter wrote:

Well, that would explain why XP shows ~8MB of empty space at the end of the drive, right?

Yes, one cylinder is approximatly 8 MB in size.  Hence when using cylinder alignment, anything less than a full cylinder will not be used.

drfsupercenter wrote:

Though Windows 7 seems to do the same thing, and that's much newer.  And sure, I'll try to get a video later, that's probably more useful than steps.

Written steps work very well.  Most important is that the steps are repeatable with the same result.

7

Re: Empty Space Before/After Partitions

Alright, well I took a couple videos (silent ones), I can go over what I did in text too.

I had a computer that I wiped using Darik's Boot and Nuke, as well as an 8GB flash drive.  The videos show me partitioning the flash drive.

This is an older version of Parted Magic that contains an older GParted:
http://www.youtube.com/watch?v=CmWUHPfPE3Q

As you can see, it prompts me to create a partition table (since the device was completely erased), which I do, and then make a FAT32 partition, leaving all the settings alone - this leaves it with 0MB free space before and after the partition, which fills the entire drive.
I click OK and apply it, and everything works perfectly.

8

Re: Empty Space Before/After Partitions

Now, this is using the most recent Parted Magic, from 02/27/2012, which would (I assume) have the most current GParted:
http://www.youtube.com/watch?v=bCUUysiojvA

I first show how there's a little over 1MB of empty space at the end of the drive, despite me supposedly filling it in the previous GParted.  Then I create a partition table again (it's quicker than deleting the partition, so I usually do that)
When going to do the exact same process as before (note that it won't let me change that 1MB of free space at the beginning to 0), it immediately fails.  My "usual method" also doesn't work anymore, if I create a partition in the middle of the drive, that WILL work, but as soon as I try to move it all the way to the left, it fails.

Keep in mind, this is a flash drive, so it's not like there are actual cylinders to worry about - that, and I was rounding to MiB anyway with the newer version.

So as you can see from the two videos, it's a bit of a problem when the newer GParted won't even let me partition a drive correctly.  I have no reason not to use the older one, but if using MiB does in fact give you more space on the drive I would LIKE to switch provided it actually works.

Sorry for the double post, it was limiting me to one link in each.

9

Re: Empty Space Before/After Partitions

Thank you for the extra information provided by the videos.  From watching it certainly does appear that you have discovered a bug.

Would you be able to provide the output from the following two commands?

fdisk -l -u

where one of the options is a lower case "L" and not the number one.

parted /path-to-your-device unit s print

where /path-to-your-device is something like /dev/sda.

This will help me try to recreate the exact size of the disk and hopefully recreate the problem you experienced.

As a work around, you might try using the "Align to Cylinder" option in the new version of GParted.  This older alignment option should work similar to the old version of GParted.

10 (edited by drfsupercenter 2012-03-16 16:35:57)

Re: Empty Space Before/After Partitions

Yep, you're right, it worked fine when using "align to cylinder" and did the same thing as the older version of GParted, where it would show about 1.5MB of empty space at the end.  At least I know why, now.

Here's the output of the first:

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   117209087    58603520    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 8103 MB, 8103395328 bytes
250 heads, 62 sectors/track, 1021 cylinders, total 15826944 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: 0x00069944

(I removed the /sda stuff as that's irrelevant)

And here's the second:

Model: PNY USB 2.0 FD (scsi)
Disk /dev/sdb: 15826944s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

Hopefully that helps.  For what it's worth, it does the same thing to me with hard drives too, not just flash drives, I think there's only been one or two computers that the new version has fully worked for me, literally every other one does that same problem - usually with NTFS, I only use FAT32 for removable drives.

--EDIT--

Oh, and that's after erasing the partitions by creating a MSDOS partition table, hence the second output.  Hopefully that's alright, otherwise I can "nuke" the drive to erase that portion too.

11

Re: Empty Space Before/After Partitions

Thanks for the info.  Hopefully I will be able to recreate the problem.  If I can then the next step would be to work on a solution.

12

Re: Empty Space Before/After Partitions

Can you perform the test whereby you create a partition that fills the entire drive again?

When it fails, please save the gparted_details.htm log file and post it here.

13

Re: Empty Space Before/After Partitions

Alright, ironically that same flash drive I had originally used worked perfectly... isn't that always my luck?

So I tried two others, a 4GB and 8GB (Same PNY model, I have a few of those)

Both errored when trying to fill the drive with a FAT32 rounded to MiB.  For the 4GB, what I did was my "usual trick" - make a small partition in the middle somewhere, then move to the left while resizing.  That seems to work about 50/50, the other half of the times it errors when moving and I have to start over.

Here are the details.  When it first failed to create a full partition:

GParted 0.12.0 --enable-libparted-dmraid

Libparted 2.3

Create Primary Partition #1 (fat32, 3.74 GiB) on /dev/sdb  00:00:00    ( ERROR )  
     create empty partition  00:00:00    ( SUCCESS )  
     path: /dev/sdb1
start: 2,048
end: 7,839,743
size: 7,837,696 (3.74 GiB)  
 
set partition type on /dev/sdb1  00:00:00    ( SUCCESS )  
     new partition type: fat32  
 
create new fat32 file system  00:00:00    ( ERROR )  
     mkdosfs -F32 -v -n "" /dev/sdb1  
     mkdosfs 3.0.11 (24 Dec 2010)
 
/dev/sdb1: No such file or directory
 
 
 
 

========================================

Now, when I moved that partition to fill the drive:

GParted 0.12.0 --enable-libparted-dmraid

Libparted 2.3

Move /dev/sdb1 to the left and grow it from 291.00 MiB to 3.74 GiB  00:00:04    ( SUCCESS )  
     calibrate /dev/sdb1  00:00:00    ( SUCCESS )  
     path: /dev/sdb1
start: 2,070,528
end: 2,666,495
size: 595,968 (291.00 MiB)  
 
check file system on /dev/sdb1 for errors and (if possible) fix them  00:00:00    ( SUCCESS )  
     dosfsck -a -w -v /dev/sdb1  
     dosfsck 3.0.11 (24 Dec 2010)
dosfsck 3.0.11, 24 Dec 2010, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkdosfs"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
4096 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
299008 bytes per FAT (= 584 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 614400 (sector 1200)
74346 data clusters (304521216 bytes)
62 sectors/track, 124 heads
0 hidden sectors
595968 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/sdb1: 0 files, 1/74346 clusters
 
 
 
grow partition from 291.00 MiB to 1.27 GiB  00:00:00    ( SUCCESS )  
     old start: 2,070,528
old end: 2,666,495
old size: 595,968 (291.00 MiB)  
new start: 2,048
new end: 2,666,495
new size: 2,664,448 (1.27 GiB)  
 
move file system to the left  00:00:01    ( SUCCESS )  
     using libparted  
 
shrink partition from 1.27 GiB to 291.00 MiB  00:00:00    ( SUCCESS )  
     old start: 2,048
old end: 2,666,495
old size: 2,664,448 (1.27 GiB)  
new start: 2,048
new end: 598,015
new size: 595,968 (291.00 MiB)  
 
check file system on /dev/sdb1 for errors and (if possible) fix them  00:00:00    ( SUCCESS )  
     dosfsck -a -w -v /dev/sdb1  
     dosfsck 3.0.11 (24 Dec 2010)
dosfsck 3.0.11, 24 Dec 2010, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSWIN4.1"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
4096 bytes per cluster
44 reserved sectors
First FAT starts at byte 22528 (sector 44)
2 FATs, 32 bit entries
297984 bytes per FAT (= 582 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 618496 (sector 1208)
74345 data clusters (304517120 bytes)
62 sectors/track, 124 heads
2048 hidden sectors
595968 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/sdb1: 0 files, 1/74345 clusters
 
 
 
grow partition from 291.00 MiB to 3.74 GiB  00:00:00    ( SUCCESS )  
     old start: 2,048
old end: 598,015
old size: 595,968 (291.00 MiB)  
new start: 2,048
new end: 7,839,743
new size: 7,837,696 (3.74 GiB)  
 
check file system on /dev/sdb1 for errors and (if possible) fix them  00:00:00    ( SUCCESS )  
     dosfsck -a -w -v /dev/sdb1  
     dosfsck 3.0.11 (24 Dec 2010)
dosfsck 3.0.11, 24 Dec 2010, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSWIN4.1"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
4096 bytes per cluster
44 reserved sectors
First FAT starts at byte 22528 (sector 44)
2 FATs, 32 bit entries
297984 bytes per FAT (= 582 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 618496 (sector 1208)
74345 data clusters (304517120 bytes)
62 sectors/track, 124 heads
2048 hidden sectors
595968 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/sdb1: 0 files, 1/74345 clusters
 
 
 
grow file system to fill the partition  00:00:03    ( SUCCESS )  
     using libparted  
 
 

========================================

This is on my 8GB flash drive, failed partition creation:

GParted 0.12.0 --enable-libparted-dmraid

Libparted 2.3

Create Primary Partition #1 (fat32, 7.46 GiB) on /dev/sdc  00:00:00    ( ERROR )  
     create empty partition  00:00:00    ( SUCCESS )  
     path: /dev/sdc1
start: 2,048
end: 15,638,527
size: 15,636,480 (7.46 GiB)  
 
set partition type on /dev/sdc1  00:00:00    ( SUCCESS )  
     new partition type: fat32  
 
create new fat32 file system  00:00:00    ( ERROR )  
     mkdosfs -F32 -v -n "" /dev/sdc1  
     mkdosfs 3.0.11 (24 Dec 2010)
 
/dev/sdc1: No such file or directory
 
 
 
 

========================================

On this one I tried your initial suggestion and rounded it to cylinders instead of MiB.  That worked, here's the details:

GParted 0.12.0 --enable-libparted-dmraid

Libparted 2.3

Create Primary Partition #1 (fat32, 7.45 GiB) on /dev/sdc  00:00:13    ( SUCCESS )  
     create empty partition  00:00:00    ( SUCCESS )  
     path: /dev/sdc1
start: 63
end: 15,631,244
size: 15,631,182 (7.45 GiB)  
 
set partition type on /dev/sdc1  00:00:00    ( SUCCESS )  
     new partition type: fat32  
 
create new fat32 file system  00:00:13    ( SUCCESS )  
     mkdosfs -F32 -v -n "" /dev/sdc1  
     mkdosfs 3.0.11 (24 Dec 2010)
/dev/sdc1 has 255 heads and 63 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 15631182 sectors;
file system has 2 32-bit FATs and 8 sectors per cluster.
FAT size is 15240 sectors, and provides 1950083 clusters.
There are 32 reserved sectors.
Volume ID is 63badb0f, no volume label.
 
 
 
 

========================================

And finally, I resized it to fill that extra couple MB's that were left at the end, rounded to MiB this time, which worked:

GParted 0.12.0 --enable-libparted-dmraid

Libparted 2.3

Grow /dev/sdc1 from 7.45 GiB to 7.46 GiB  00:00:05    ( SUCCESS )  
     calibrate /dev/sdc1  00:00:00    ( SUCCESS )  
     path: /dev/sdc1
start: 63
end: 15,631,244
size: 15,631,182 (7.45 GiB)  
 
check file system on /dev/sdc1 for errors and (if possible) fix them  00:00:01    ( SUCCESS )  
     dosfsck -a -w -v /dev/sdc1  
     dosfsck 3.0.11 (24 Dec 2010)
dosfsck 3.0.11, 24 Dec 2010, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkdosfs"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
4096 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
7802880 bytes per FAT (= 15240 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 15622144 (sector 30512)
1950083 data clusters (7987539968 bytes)
63 sectors/track, 255 heads
0 hidden sectors
15631182 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/sdc1: 0 files, 1/1950083 clusters
 
 
 
grow partition from 7.45 GiB to 7.46 GiB  00:00:00    ( SUCCESS )  
     old start: 63
old end: 15,631,244
old size: 15,631,182 (7.45 GiB)  
new start: 63
new end: 15,638,527
new size: 15,638,465 (7.46 GiB)  
 
check file system on /dev/sdc1 for errors and (if possible) fix them  00:00:01    ( SUCCESS )  
     dosfsck -a -w -v /dev/sdc1  
     dosfsck 3.0.11 (24 Dec 2010)
dosfsck 3.0.11, 24 Dec 2010, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkdosfs"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
4096 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
7802880 bytes per FAT (= 15240 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 15622144 (sector 30512)
1950083 data clusters (7987539968 bytes)
63 sectors/track, 255 heads
0 hidden sectors
15631182 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
/dev/sdc1: 0 files, 1/1950083 clusters
 
 
 
grow file system to fill the partition  00:00:03    ( SUCCESS )  
     using libparted  
 
 

========================================

Hopefully that helps you.  It seems really odd, that it says it can't find that folder, I've never seen such an error before, but it does it on a majority of drives I try it on as you can see from the stuff I posted.  Rounding to cylinders usually works, however I've had that fail as well when the older version of GParted never failed.

14

Re: Empty Space Before/After Partitions

Thank you drfsupercenter for running these extra tests.

Error messages like  "/dev/sdb1: No such file or directory" usually mean that the underlying GNU/Linux operating system did not create a device entry for the partition.

And you are right, this does seem odd.  It suggests that there is a problem with the GNU/Linux distribution, namely Parted Magic in this case.

Would you be able to try your tests again using the latest GParted Live 0.12.0-5?

That will help to pinpoint if the problem is common to both GNU/Linux distributions, or only a problem with Parted Magic.

15

Re: Empty Space Before/After Partitions

Hmm, that's weird.  I just tried the GParted live CD, and while I swear it did the exact same thing as Parted Magic, it seems to have worked fine on both a hard drive and flash drive.

So maybe it IS just a Parted Magic problem.  Every version of Parted Magic that has used the newer GParted versions has had this problem, though, so it's not just the newest build.

Maybe you can try getting the 02/27/12 build of Parted Magic and see if you can figure out why it's acting up?

16

Re: Empty Space Before/After Partitions

GParted Live is based on Debian (Sid), so it would appear that the Debian GNU/Linux distribution, and all distributions based on Debian should be okay.

Since Parted Magic failed, you might want to follow up with the Parted Magic team to learn which GNU/Linux distribution it is based on.  Then you can try to narrow down if the distribution is at fault, or if the problem is something specific only to Parted Magic.

17

Re: Empty Space Before/After Partitions

It is rather clear now that the issue has to do with the operating system of the cd.
I understand from the Parted Magic web page that it is mostly based on Slackware.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

18

Re: Empty Space Before/After Partitions

So would it be a problem with Slackware or specific to Parted Magic? Are there other live Slackware distros that use GParted that I could test?

19

Re: Empty Space Before/After Partitions

There are many live cds that contain GParted. There are various Linux distros, as well as tools for a specific work.
I don't know details on the o.s. in the Parted Magic cd as well as slackware, they aren't necessarily the same.
I think that Gedakc's suggestion is right: the Parted magic team would be more appropriate to fix the issue. smile

*** It is highly recommended to backup any important files before doing resize/move operations. ***

20

Re: Empty Space Before/After Partitions

WOW!!!  Great to see an actual clear concise response to a query.  I have always wondered about the unallocated space and your post clearly provided the reasoning behind the unused space.  Now if OS developers and memory manufacturers could just agree to report USABLE memory instead of bull do do memory,  i.e. just bought a 750GB drive but it shows as 698GB and after wasting 10mb that can't be allocated it is really 697GB of usable space.  Serious bull sheit.

gedakc wrote:

Following is a list of differences to help you understand what is occuring:

GParted versions < 0.6.0 default to Cylinder alignment.
GParted versions >= 0.6.0 default to MiB alignment.

Old operating systems will only work with cylinder alignment.
New operating systems will work with both.

Old drives (small), actually matched the cylinders/heads/sectors (CHS) reported by the drive.
New drives (large), fake this value so there is no performance gained by trying to align to cylinders.
With new drives, especially solid-state drives, the performance is much better with MiB alignment than the old simulated cylinder alignment.

Old versions of GParted did not display free space less less than one cylinder (about 8 MB)
New versions of GParted do not display free space less than 1 MiB (1024 x 1024 bytes)

Free space (unallocated) must be left on the drive to store the structure used for the partition table.  Hence you will always have "free space" on a drive, even if the drive is fully used.  In the case of an MSDOS partition table, space must be reserved for the Master Boot Record, and also for each Extended Boot Record in front of each logical partition.

To maximize space usage, you should stick to one partition alignment scheme per disk device.
If you use old operating systems you should use cylinder alignment.
If you use new operating systems you should use MiB alignment.

On a different note, if you are experiencing problems with GParted, then can search the bug database to see if the problem has already been reported.  If not then opening a new bug report begins the process to resolve the problem.

Perhaps you have run into the following bug?
Bug 664050 - Unable to resize extended partition