After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626946 - Destination partition smaller than source partition
Destination partition smaller than source partition
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
0.6.2
Other Linux
: Normal major
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2010-08-14 17:49 UTC by ali
Modified: 2010-09-23 17:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screen shot of GParted copy of sdd1 and paste into space immediately following works (38.34 KB, image/png)
2010-09-02 18:05 UTC, Curtis Gedak
Details

Description ali 2010-08-14 17:49:45 UTC
I have Ubuntu installed on my flash drive (/dev/sdb 4GB), and I attempted to copy /dev/sdb1 (3.2GB) to an unallocated 80GB /dev/sda. So I select to /dev/sdb, right click on /dev/sdb1 and choose "copy". Then I select /dev/sda, right click in the unallocated 80GB space and choose "paste". Then I apply the operation and I get an error "The destination partition is smaller than the source partition" (could be paraphrased). I tried this several times with the same result.

Then I attempted something that actually worked but this should NOT be necessary:
After pasting the /dev/sdb1 partition to /dev/sda, I increased its size by just one Megabyte and THEN pressed apply. This applied the operation without any problems. 

I don't know why didn't it work without increasing the size by 1MB, can you explain.
Comment 1 ali 2010-08-14 17:55:28 UTC
Now I just tried the same for the 222MB swap partition ( /dev/sdb2 ). The same problem occured. I had to increase its size to 223MB and ONLY THEN the operation was applied successfully.

I remember now that I had this problem in the past with different flash drives on a different computer.
Comment 2 Curtis Gedak 2010-08-14 19:56:49 UTC
Would you be able to save and post the gparted_details.htm log file when you perform this operation?
Comment 3 Curtis Gedak 2010-09-01 23:00:52 UTC
I have been able to confirm this problem.

My test case involves the following steps:

1)  Create a 24 MiB ext2 partition using "align to Cylinder", and apply this operation.

2)  Copy and paste this partition using "align to MiB".

3)  Apply this operation and an error is encountered.
    The error message "the destination is smaller than the source partition"
     can be displayed by expanding the GParted details log.
Comment 4 Curtis Gedak 2010-09-02 18:05:23 UTC
Created attachment 169381 [details]
Screen shot of GParted copy of sdd1 and paste into space immediately following works

I have discovered an interesting anomaly.

First, let me add a step at the start of the above list.  Specifically,

0)  Start with an empty msdos partition table on the disk device.


Now using the above steps, the copy of sdd1 and paste into the entire unallocated space on the drive following the only partition sdd1 will fail with the error message indicating destination smaller than source partition.

But if I first create and apply an extended partition (sdd2) that has 24 MiB Free Space Preceding with "align to MiB", then the copy of sdd1 and paste into the unallocated space between sdd1 and sdd2 will succeed.

This is odd behaviour because pasting into a smaller unallocated space works, whereas pasting into a large unallocated space fails.
Comment 5 Curtis Gedak 2010-09-09 19:24:23 UTC
A fix for the problem of destination partition smaller than source partition when pasting a MiB aligned partition after a cylinder aligned partition has been committed to the git repository for inclusion in the next release of GParted (0.6.3).

The relevant git commit can be viewed at the following link:
http://git.gnome.org/browse/gparted/commit/?id=b77a5e229dae407b40fdf6661483a3808797251d


ali, if you are up to compiling the GParted source code you could download the git version and test it to confirm that it resolves the problem for you.

Instructions on how to compile GParted from the git source code repository can be found at the following link:
     How to Build GParted from git Source Code Repository
     http://gparted-forum.surf4.info/viewtopic.php?id=14136
Comment 6 ali 2010-09-10 04:24:21 UTC
Thank you for the fix. I think I will wait for the the official release though, because I recently changed my Linux distro and now I am still trying to figure out all the differences between my old distro and this one.
Comment 7 Curtis Gedak 2010-09-23 17:05:37 UTC
The enhancements to address this bug report have been included in GParted 0.6.3 which was released on September 23, 2010.

Closing this bug report.