GNOME Bugzilla – Bug 626946
Destination partition smaller than source partition
Last modified: 2010-09-23 17:05:37 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.
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.
Would you be able to save and post the gparted_details.htm log file when you perform this operation?
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.
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.
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
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.
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.