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
Line 662 :
# Now turn on swap in case we swap to files.
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):
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
The first swapon call will try to use /dev/hda1 ( the symlink still points to it )
devlabel is run before swapon and updates the symlink to point to /dev/hdc1.
swapon has no error.
Closing bugs on older, no longer supported, releases. Apologies for any lack of
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.