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 670017 - Corrupting swap partitions
Corrupting swap partitions
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
0.11.0
Other Linux
: Normal normal
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2012-02-13 21:46 UTC by Brad C
Modified: 2012-02-22 00:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Brad C 2012-02-13 21:46:35 UTC
I'm using gparted-live-0.11.0-10.iso

The main thing I use gparted for is aligning partitions in VMware virtual machines. For an 8GB drive Debian lenny and prior will create a single ext3 partition followed by an extended partition that contains a ~400MB swap partition and it would leave a few MB of free space at the end of the disk.

My alignment procedure was:

1. Grow the extended partition to fill the drive
2. Move the swap partition as far to the end as it will go
3. Shrink the extended partition to be 1 MiB larger than the swap partition
(more stuff to align the ext3 partition that isn't relevant here)

This used to work fine, but with this version of the live CD if I do this then after step #2 the swap partition shows as unrecognized, like it has become corrupt. Since it's just a swap partition I can immediately reformat it as 
linux-swap and it works fine, but it didn't used to require this step.
Comment 1 Curtis Gedak 2012-02-14 01:36:12 UTC
Thank you Brad for reporting this problem.

Using the steps you mentioned I have been able to confirm the problem.

Swap space is a special case because GParted no longer copies the data, but instead is supported to recreate the swap space in the new location using the same label and UUID.

Out of curiosity, what was the previous version you used that did work correctly?
Comment 2 Brad C 2012-02-14 02:12:01 UTC
I think the last one I used was 0.9.0-7
Comment 3 Curtis Gedak 2012-02-14 18:38:49 UTC
From checking the code I discovered that this regression was introduced in GParted version 0.11.0 by the following change:

Bug #663980 - Avoid redundant file system maximize actions on
              copy, move, and resize

A new enhancement to address this regression has been committed to the Gnome git repository for inclusion in the next release of GParted (0.12.0 on Feb 21, 2012).

The relevant git commit can be viewed at the following link:

Fix regression when shrinking, moving and copying swap (#670017)
http://git.gnome.org/browse/gparted/commit/?id=93241cccbf4974a4a0ce4024cf94278f9ba3f386
Comment 4 Curtis Gedak 2012-02-18 20:11:14 UTC
Moving this bug report from livecd to application component since it will occur on any install of GParted 0.11.0.
Comment 5 Curtis Gedak 2012-02-22 00:58:18 UTC
This enhancement has been included in GParted 0.12.0 released on
February, 21, 2012.