swap not mounted with mountall unless listed last in /etc/fstab

Bug #839118 reported by Brian Vaughan
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
mountall (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

A swap partition is not mounted on boot, and is not mounted with mountall, despite being listed in /etc/fstab, unless the line describing the swap partition is the last line in /etc/fstab. This can be seen by executing 'mountall -v' with the line describing the swap partition at any other point in /etc/fstab: the last line of output will appear similar to 'local 4/4 remote 0/0 virtual 12/12 swap 0/0'.

There is a description of the bug, and the workaround:
http://askubuntu.com/questions/38533/system-not-mounting-swap-partition

Tags: natty
Revision history for this message
Brian Vaughan (bgvaughan) wrote :

$ uname -a
Linux brian-desktop 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:02:55 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

$ mountall --version
mountall 2.26

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mountall (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

I was unable to recreate this on Oneiric, 11.10, using mountall version 2.31.

tags: added: natty
Revision history for this message
Steve Langasek (vorlon) wrote :

Please attach (do not paste) verbatim copies of the /etc/fstab that works and the one that doesn't.

Changed in mountall (Ubuntu):
status: Confirmed → Incomplete
Changed in mountall (Ubuntu):
importance: Undecided → Low
Revision history for this message
Brian Vaughan (bgvaughan) wrote :

Attached is the "good" version of /etc/fstab that I am currently using, and here also are the output of some commands to indicate the status of swap on my system.

I will attach the "bad" version and the results of the same commands when I can safely reboot my machine. (It tends to get stuck during the shutdown process, requiring CTRL-ALT-DEL or manually cycling the power. This is an unrelated problem as far as I know.)

brian@brian-desktop:~$ swapon -s
Filename Type Size Used Priority
/dev/sdb1 partition 10485756 0 -1
brian@brian-desktop:~$ free
             total used free shared buffers cached
Mem: 8177364 1474892 6702472 0 64740 768664
-/+ buffers/cache: 641488 7535876
Swap: 10485756 0 10485756
brian@brian-desktop:~$ dmesg | grep sdb1
[ 2.320759] sdb: sdb1 sdb2 < sdb5 > sdb3 sdb4
[ 21.479866] Adding 10485756k swap on /dev/sdb1. Priority:-1 extents:1 across:10485756k

Revision history for this message
Brian Vaughan (bgvaughan) wrote :

Attached is a "bad" version of /etc/fstab, in which swap is not enabled. Note that the only change is that the line for mounting the swap partition (and the associated comments) were moved away from the end of fstab. Here also are the results of the same commands above, after booting with the "bad" version of fstab.

brian@brian-desktop:~$ swapon -s
Filename Type Size Used Priority
brian@brian-desktop:~$ free
             total used free shared buffers cached
Mem: 8177364 2124676 6052688 0 251704 684220
-/+ buffers/cache: 1188752 6988612
Swap: 0 0 0
brian@brian-desktop:~$ dmesg | grep sdb1
[ 2.325388] sdb: sdb1 sdb2 < sdb5 > sdb3 sdb4
brian@brian-desktop:~$ dmesg | grep swap

Steve Langasek (vorlon)
Changed in mountall (Ubuntu):
status: Incomplete → New
Revision history for this message
Steve Langasek (vorlon) wrote :

ok. I don't see anything obvious in the difference between these two files that accounts for the problem. FWIW, I have swap listed right after the rootfs in my fstab and it's enabled without problems.

Are you sure it has to be the *very* last entry to work? Have you tried moving it up line-by-line, to see if there's a point at which it stops working?

# Do not allow regular users to mount Windows partitions. --Brian
UUID=1C86E55286E52D48 none ntfs noauto,nouser,ro 0 0
UUID=DA0AE5E20AE5BC1F /mnt/SYSTEM_RESERVED ntfs noauto,nouser,ro 0 0
UUID=C25CE7335CE72141 /etc/Gateway ntfs noauto,nouser,ro 0 0
# Windows Music partition.
UUID=534A80BF40E99C01 /mnt/Music ntfs noauto,nouser 0 0

These entries are very interesting; none of these are valid UUIDs, but apparently this *is* what udev returns as the UUID format for NTFS partitions. Does the behavior change if you comment these entries out?

Revision history for this message
Steve Langasek (vorlon) wrote :

Looking at the other bugs on mountall, I think this is the same as bug #730023 - I see that you have another partition configured with "none" as the mount target. So it's probably the ordering of these two filesystems in the fstab that has the effect.

Why do you have a filesystem listed with a mount point of "none"? It's a bug in mountall that this fails to work, but that seems like cruft that shouldn't be there.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mountall (Ubuntu):
status: New → Confirmed
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.