devfs
[Top] [All Lists]

Re: swapon -a errors w/ devfs

To: "Kevin P. Fleming" <kevin@xxxxxxxxxxxxx>
Subject: Re: swapon -a errors w/ devfs
From: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Date: Wed, 2 May 2001 09:05:45 -0600
Cc: "Eric Sandeen" <sandeen@xxxxxxx>, "Glenn Shannon" <glenn@xxxxxxxxxxxx>, <devfs@xxxxxxxxxxx>
In-reply-to: <003301c0d316$0fd480e0$65aaa8c0@Kevin>
References: <3AEF6499.F84AFBBB@xxxxxxx> <3AEF68BD.D8368188@xxxxxxxxxxxx> <3AEF6CD2.93BC5542@xxxxxxx> <003301c0d316$0fd480e0$65aaa8c0@Kevin>
Sender: owner-devfs@xxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>