Bug 196208 - bringing up arbitrary swap devices breaks hibernate and swap priorities
Summary: bringing up arbitrary swap devices breaks hibernate and swap priorities
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-06-21 21:11 UTC by Alexandre Oliva
Modified: 2014-03-17 03:00 UTC (History)
3 users (show)

Fixed In Version: 8.36-1
Clone Of:
Environment:
Last Closed: 2006-07-21 18:45:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alexandre Oliva 2006-06-21 21:11:16 UTC
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
fi

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):
initscripts-8.35-1

How reproducible:
Every time

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

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 21:54:16 UTC
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 18:45:45 UTC
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.