Routine fsck deactivates swap, changing UUID
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| util-linux (Ubuntu) |
High
|
Unassigned |
Bug Description
Ubuntu 6.10, all updates installed
On starting up my computer, Ubuntu began a routine fsck (30 startups since the previous one). Once it had done that, it failed to mount the swap partition, and neither "swapon -a" nor restarting could bring it back.
Fabian Rodriguez helped me diagnose the problem. /etc/fstab said:
proc /proc proc defaults 0 0
# /dev/hda1 -- converted during upgrade to edgy
UUID=08cd8430-
# /dev/hda5 -- converted during upgrade to edgy
UUID=cab9c968-
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
But "ls -l /dev/disk/by-uuid" said:
total 0
lrwxrwxrwx 1 root root 10 2007-03-08 09:55 08cd8430-
lrwxrwxrwx 1 root root 10 2007-03-08 09:55 2b2b6707-
After editing /etc/fstab so that the hda5 partition matched that given by /dev/disk/by-uuid, "swapon -a" worked.
What was expected: fsck either should not change the UUIDs of partitions, or should change them in fstab too.
This is not a duplicate of bug 66637, because I haven't run "mkswap" in the past year or so.
Fabián Rodríguez (magicfab) wrote : | #1 |
Matthew Paul Thomas (mpt) wrote : | #2 |
(Not Needs Info unless you have a specific question that only someone suffering the bug can answer.)
Changed in util-linux: | |
status: | Needs Info → Unconfirmed |
Albert Cardona (cardona) wrote : | #3 |
I confirm this. It's happening all the time in a Thinkpad T60 with Edgy dist-upgraded.
I confirm this too.
In fact, I just realized after reading this that it occured after the routine fsck. But that seem consistant with what I saw.
I had this problem in Edgy, and now in Feisty.
Scott, Kurt says you get this - feel free to reassign
Changed in util-linux: | |
assignee: | magicfab → keybuk |
importance: | Undecided → Medium |
status: | Unconfirmed → Confirmed |
Colin Watson (cjwatson) wrote : | #6 |
Presumably the title of this bug should be "fsck", not "fdisk"? I'm hoping we don't do a routine fdisk. :-)
description: | updated |
description: | updated |
Fabián Rodríguez (magicfab) wrote : | #7 |
Ooops! My MS days come back to betray me. Tx. for changing it.
Changed in util-linux: | |
importance: | Medium → High |
Cruncher (ubuntu-wkresse) wrote : | #8 |
Mostly confirmed.
It seems in my case there also seemed to have been a fsck running just before that happened, however, it was definitely not a routine fsck. (shouldn't a fsck of the root-fs leave the swap partitioned untouched anyway?)
In my case the fsck(?, probably not a full check, since it only took 2 seconds to complete) happened after a (failed) hibernation attempt, here is the message from /var/log/messages:
May 23 15:32:09 hobbes kernel: [ 10.052000] EXT3-fs: INFO: recovery required on readonly filesystem.
May 23 15:32:09 hobbes kernel: [ 10.052000] EXT3-fs: write access will be enabled during recovery.
May 23 15:32:09 hobbes kernel: [ 11.944000] kjournald starting. Commit interval 5 seconds
May 23 15:32:09 hobbes kernel: [ 11.944000] EXT3-fs: recovery complete.
I'm not sure whether this bug is related to hibernations, so here is what I did:
- I tried "Hibernate" from the Gnome shutdown menu a few days ago, which seemed to work.
- However, on wakeup all I saw was a black screen (with sync), and even Ctrl-Alt-F1 didn't work anymore. A remote login showed that Xorg was running at 100% CPU. I then performed a clean shutdown.
- I tried "Hibernate" again yesterday. Again, it did go to sleep. However, this time the machine didn't seem to resume on wakeup, but do a normal, complete reboot.
- During that reboot, the above recovery was run, but it probably was journal related, not a full fsck, since it only took a few seconds.
I don't have uswsusp or similar installed. Using Feisty.
HTH,
Cruncher
Jarno Suni (jarnos) wrote : | #9 |
I also lost swap after hibernate when using Edgy. Today I noticed the swap is not in use (by running top) while running on terminal "sudo aptitude update && aptitude show alsaplayer", using Feisty.
Patch to this is to use device name instead of the uuid thing for swap partition in /etc/fstab and then reboot. (I have not tested hibernate with it, though.)
Jarno Suni (jarnos) wrote : | #10 |
Hibernate worked in Feisty after applying this:
http://
Maybe you have to update menu.lst again after kernel update.
Jarno Suni (jarnos) wrote : | #11 |
Cruncher (ubuntu-wkresse) wrote : | #12 |
> See also https:/
"Sorry, you don't have permission to access this page."
?
Jarno Suni (jarnos) wrote : | #13 |
Cruncher, I don't understand. I can access the page even if logged off. Have a nice day anyway.
Mark Silence (madasi) wrote : | #14 |
Just wanted to add my confirmation, I've had this happen to me twice in Feisty. Since I hibernate 90% of the time, I've managed to be resuming from a hibernation each time the routine fsck kicked in. In both cases, the resume wouldn't happen, I'd get a normal boot instead, and find my swap gone.
It looks like swapon may call mkswap if it believes the partition is corrupt; this could happen after failed (or ignored) hibernation for example. Obviously this should attempt to preserve the UUID, or not happen at all.
Changed in util-linux (Ubuntu): | |
assignee: | Scott James Remnant (scott) → nobody |
status: | Confirmed → Triaged |
Phillip Susi (psusi) wrote : | #16 |
This was fixed back in karmic.
Changed in util-linux (Ubuntu): | |
status: | Triaged → Fix Released |
Can someone confirm the package affected ?