Kevin P. Fleming writes:
> I've noticed the same thing, with the identical configuration you
> have. The reason that the init scripts run swapon twice is in case
> you are using any swap _files_, they need to be turned on after all
> the filesystems have been mounted. You can either disable the second
> "swapon", or do as you say (which I was going to do as well) and
> figure out why swapon can't tell that the partition is already
> enabled.
Oh! I just had a thought on this: perhaps swapon(8) is broken the same
way as mount, and translates the symlink before calling swapon(2)
(which in turn adds the entry to /proc/swaps). However, as part of
it's scanning phase, it does a string comparison on the entries in
/etc/fstab and /proc/swaps, *without symlink translation*.
To test this, edit your /etc/fstab to use the full path name of the
swap device (the /dev/ide/... or /dev/scsi/... name). If my theory is
correct, you won't get the double swapping problem.
Someone should send Andries a patch to remove the symlink translation
code from mount(8) and swapon(8). It was always bogus.
Regards,
Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current: rgooch@xxxxxxxxxxxxxxx
|