swap not mounted after repartitioning

Bug #181726 reported by Hans Gerd Evertz
6
Affects Status Importance Assigned to Milestone
GParted
Fix Released
Unknown
gparted (Ubuntu)
New
Undecided
Unassigned
Nominated for Intrepid by David Greaves

Bug Description

Ubuntu 6.10

I repartitioned my disk with gparted.
Noted that my notebook (only 256MB RAM) became much slower and
"swapped" a lot.
Found that the swap partition was no longer active ("top" returned zero swap size).

"swapon -a" returned error message
swapon: cannot stat /dev/disk/by-uuid/a0119d95-45e9-4935-acce-d07b331db03c: No such file or directory

Found hint on http://ubuntuforums.org/archive/index.php/t-93131.html ,
namely I commented away the uuid-line from fstab and added
  /dev/hda3 none swap defaults 0 0
followed by "mount -a"

Swap seems to work now. There is some error message upon waking up from hibernate
which I cannot read
(N.B.: and I do not know how to read the error log and cannot spend still more
time to find out -- there should be a man-page or such on reading error logs)

Bottom line: repartioning the disk causes fstab to fail: This must not happen !

----------------------------------------------------------------------
Another comment: Why in the wolrd is there a "UUID" now in fstab ?
This looks like a really bad hack, requiring specific numbers where symbolic names like /dev/hda1
are appropriate. Some comment from the net:
"UUID must rank as one of the butt-ugliest new 'features'. It makes the once simple fstab almost impossible to read and is causing all sorts of support ..."

Revision history for this message
David Greaves (david-dgreaves) wrote :

I just upgraded to Intrepid.

Hibernate failed in Hardy and I wanted to see if it was fixed.
It wasn't.
It turns out I'd added more RAM and nothing noticed that swap was smaller than RAM.

I used gparted to resize the swap. That went smoothly. I did swapoff/resize/swapon from inside gparted.

Then when I rebooted I had no swap.

gparted did not update fstab with the UUID (or it changed the UUID)

Revision history for this message
Tormod Volden (tormodvolden) wrote :

David, that gparted changes the UUID when "resizing" the swap is reported in bug #302534.

Hans, it's unclear from your description what exactly happened to your swap partition. Did you resize it, or did you create a new one?

An alternative to UUID is to use disk labels. This is a bit more robust in some cases, but does not provide the "uniqueness" of an UUID.

Revision history for this message
Curtis Gedak (gedakc) wrote :

GParted 0.4.4 has just been released. It includes a bug fix to maintain the same UUID and LABEL when resizing a swap partition.

See GParted Bug:
http://bugzilla.gnome.org/show_bug.cgi?id=575585

Changed in gparted:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.