Bug 88000 - swapon called before devlabel in rc.sysinit
Summary: swapon called before devlabel in rc.sysinit
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-04 14:54 UTC by David Balažic
Modified: 2014-03-17 02:35 UTC (History)
2 users (show)

Fixed In Version: FC3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-30 18:42:48 UTC
Embargoed:


Attachments (Terms of Use)

Description David Balažic 2003-04-04 14:54:09 UTC
Description of problem:

In /etc/rc.d/rc.sysinit , swapon is called before devlabel,
so swapon might try to use the wrong device file, in case the swap device file
is managed by devlabel ( recommended if you change the disk drives a lot )

Line 338 :
action $"Activating swap partitions: " swapon -a -e

Line 501 :
if [ -x /sbin/devlabel ]; then
        /sbin/devlabel restart
fi

Line 662 :
# Now turn on swap in case we swap to files.
swapon -a
action $"Enabling swap space: " /bin/true

The second swapon will "catch" the devlabel managed swap device, but the fisrt
might still try to access a wrong one ( because the symlink has not yet been
updated by devlabel and points to the old, possibly wrong device )

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

initscripts-7.14-1

How reproducible:


Steps to Reproduce:
1. setup a devlabel managed swap device :
  - mkswap /dev/hdxy ( for example hda1 )
  - devlabel add -d /dev/hda1 -s /dev/swap1
( /dev/swap1 is now a symlink to /dev/hda1 )
  - add /dev/swap1 into /etc/fstab
2. make your swap disk change its name ( change from master to slave , or place
on different channel ) , let's assume it was hda before and is hdc now
3. boot
    
Actual results:

The first swapon call will try to use /dev/hda1 ( the symlink still points to it )

Expected results:

devlabel is run before swapon and updates the symlink to point to /dev/hdc1.
swapon has no error.

Additional info:

Comment 1 Bill Nottingham 2005-09-30 18:42:48 UTC
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

devlabel has since been deprecated in favor of udev. Therefore, changes to
earlier release code probably won't be made, and I'm closing this.


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