GNOME Bugzilla – Bug 575585
keep a swap partition's UUID & LABEL after resizing it
Last modified: 2009-08-11 20:56:56 UTC
Because there is no operation to resize a swap pseudo-filesystem, GParted just formats it after it resizes a swap partition (there is no useful data on it anyway). Currently this means that it gets a new UUID & possibly LABEL, and the swap lines in /etc/fstab won't work anymore if they use one of those to specify the device. This is confusing for less experienced users (suddenly there is no swap available anymore). See e.g.: http://gparted-forum.surf4.info/viewtopic.php?id=13247 We could use the -L and -U commandline options of mkswap to set those manually to the same as they were before the partition resize: http://manpages.ubuntu.com/manpages/jaunty/en/man8/mkswap.8.html
An enhancement to GParted to maintain the label and UUID when resizing a swap partition has been committed to the Gnome SVN repository. Jan, would you be able to test this enhancement?
Seems to work (I only tested it once though). Oh, something to check: does it escape strange characters in the label? PS: I just found another "bug": it's not possible to set/change the label of a swap partition. Also, I suppose this requires a mkswap that's new enough? (We might need to check for that or name it as a requirement somehow?)
Thanks for testing Jan. At the moment, none of the commands used in GParted have strange characters escaped. It might not be wise to use strange characters in a label. Otherwise these strange characters would also need to be escaped when mounting by label, etc. Having said that, GParted should be set up to properly handle such characters. I would consider this a candidate for a new bug report :-) The fix to this bug will be available in the next release of GParted (0.4.4). Closing this bug.
*** Bug 564744 has been marked as a duplicate of this bug. ***