Bug 196208 - bringing up arbitrary swap devices breaks hibernate and swap priorities
bringing up arbitrary swap devices breaks hibernate and swap priorities
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: EasyFix, Regression
Depends On:
  Show dependency treegraph
Reported: 2006-06-21 17:11 EDT by Alexandre Oliva
Modified: 2014-03-16 23:00 EDT (History)
3 users (show)

See Also:
Fixed In Version: 8.36-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-21 14:45:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2006-06-21 17:11:16 EDT
Description of problem:
A system with multiple swap devices configured in /etc/fstab will no longer
respect the swap priorities specified in this file, and will use swap devices
reserved for other sessions e.g. xen virtual machines or clustered-LVM
shared-disk units.

This is the culprit:

swappartitions=`blkid -t TYPE=swap -o device`
if [ x"$swappartitions" != x ]; then
        action $"Enabling local swap partitions: " swapon $swappartitions

If it must be there for some reason, it ought to be *after*, not before swapon
-a -e.

Version-Release number of selected component (if applicable):

How reproducible:
Every time

Steps to Reproduce:
1.Set up two swap devices
2.Boot up
3.Change their order in /etc/fstab

Actual results:
The change had no effect in the priorities listed by swapon -s

Expected results:
It should have.  Hibernate relies on that.  Specifying priorities explicitly
breaks as well.

Additional info:
Comment 1 Ian Pilcher 2006-07-05 17:54:16 EDT
This needs to die a quick and unregretted death.  Just because a swap partition
is sitting there, that does not give us the right to use it.  It could, for
example, have a hibernated session from another Linux version installed on the
same system.  (Not the best idea, I know, but that doesn't mean we should
just go trampling over it.)

Trying to use RAID-1 component partitions is the least of the sins here.
Comment 2 Bill Nottingham 2006-07-21 14:45:45 EDT
Fixed in 8.36-1. You now set AUTOSWAP=yes in /etc/sysconfig/init to do it, and
the errors on duplicate device bringup are gone.

Note You need to log in before you can comment on or make changes to this bug.