* swapoff weird
@ 2000-12-09 21:24 Pavel Machek
2000-12-09 21:41 ` Rik van Riel
2000-12-09 22:46 ` David Feuer
0 siblings, 2 replies; 8+ messages in thread
From: Pavel Machek @ 2000-12-09 21:24 UTC (permalink / raw)
To: kernel list
Hi!
It is possible to remove swapfile in use. Great, but how do you swap
off then? Who is to blame?
root@bug:~# swapoff /tmp/swap
swapoff: /tmp/swap: No such file or directory
root@bug:~# > /tmp/swap
root@bug:~# swapoff /tmp/swap
swapoff: /tmp/swap: Invalid argument
root@bug:~#
How do I get out of this bad situation?
Pavel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: swapoff weird
2000-12-09 21:24 swapoff weird Pavel Machek
@ 2000-12-09 21:41 ` Rik van Riel
2000-12-09 22:06 ` Pavel Machek
2000-12-09 22:46 ` David Feuer
1 sibling, 1 reply; 8+ messages in thread
From: Rik van Riel @ 2000-12-09 21:41 UTC (permalink / raw)
To: Pavel Machek; +Cc: kernel list
On Sat, 9 Dec 2000, Pavel Machek wrote:
> It is possible to remove swapfile in use. Great, but how do you
> swap off then? Who is to blame?
As usual, root is to blame ;)
> root@bug:~# swapoff /tmp/swap
> swapoff: /tmp/swap: No such file or directory
> root@bug:~# > /tmp/swap
> root@bug:~# swapoff /tmp/swap
> swapoff: /tmp/swap: Invalid argument
> root@bug:~#
Don't let your automatic /tmp cleaners remove the swap
file ;)
> How do I get out of this bad situation?
Reboot.
cheers,
Rik
--
Hollywood goes for world dumbination,
Trailer at 11.
http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: swapoff weird
2000-12-09 21:41 ` Rik van Riel
@ 2000-12-09 22:06 ` Pavel Machek
2000-12-09 22:41 ` David Ford
0 siblings, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2000-12-09 22:06 UTC (permalink / raw)
To: Rik van Riel; +Cc: Pavel Machek, kernel list
> On Sat, 9 Dec 2000, Pavel Machek wrote:
>
> > It is possible to remove swapfile in use. Great, but how do you
> > swap off then? Who is to blame?
>
> As usual, root is to blame ;)
I do not agree. It is too easy to get to situation like this.
> > root@bug:~# swapoff /tmp/swap
> > swapoff: /tmp/swap: No such file or directory
> > root@bug:~# > /tmp/swap
> > root@bug:~# swapoff /tmp/swap
> > swapoff: /tmp/swap: Invalid argument
> > root@bug:~#
>
> Don't let your automatic /tmp cleaners remove the swap
> file ;)
>
> > How do I get out of this bad situation?
>
> Reboot.
I'm afraid even reboot will not work.
I can't swapoff. Therefore filesystem is busy (it must be -- kernel
might be writing to file on it!). And no way to get out of that.
--
The best software in life is free (not shareware)! Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: swapoff weird
2000-12-09 21:24 swapoff weird Pavel Machek
2000-12-09 21:41 ` Rik van Riel
@ 2000-12-09 22:46 ` David Feuer
2000-12-10 7:56 ` Peter Samuelson
2000-12-10 9:10 ` David Feuer
1 sibling, 2 replies; 8+ messages in thread
From: David Feuer @ 2000-12-09 22:46 UTC (permalink / raw)
To: linux-kernel
At 10:24 PM 12/9/2000 +0100, you wrote:d
>It is possible to remove swapfile in use. Great, but how do you swap
>off then? Who is to blame?
Perhaps it would be good to put a check in unlink to make sure that this is
not the last link to a swapfile. Are there any other sorts of files that
don't belong to any user process and may remain active after unlink?
--
This message has been brought to you by the letter alpha and the number pi.
Open Source: Think locally; act globally.
David Feuer
David_Feuer@brown.edu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: swapoff weird
2000-12-09 22:46 ` David Feuer
@ 2000-12-10 7:56 ` Peter Samuelson
2000-12-10 9:10 ` David Feuer
1 sibling, 0 replies; 8+ messages in thread
From: Peter Samuelson @ 2000-12-10 7:56 UTC (permalink / raw)
To: David Feuer; +Cc: linux-kernel
[David Feuer]
> Perhaps it would be good to put a check in unlink to make sure that
> this is not the last link to a swapfile.
Much better to add code to /sbin/swapon and /sbin/swapoff to set and
clear immutable bit. Sure it only works on ext2 but how far do you
want to take this thing?
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: swapoff weird
2000-12-09 22:46 ` David Feuer
2000-12-10 7:56 ` Peter Samuelson
@ 2000-12-10 9:10 ` David Feuer
2000-12-15 18:32 ` Pavel Machek
1 sibling, 1 reply; 8+ messages in thread
From: David Feuer @ 2000-12-10 9:10 UTC (permalink / raw)
To: linux-kernel
At 01:56 AM 12/10/2000 -0600, Peter Samuelson wrote:
>[David Feuer]
> > Perhaps it would be good to put a check in unlink to make sure that
> > this is not the last link to a swapfile.
>
>Much better to add code to /sbin/swapon and /sbin/swapoff to set and
>clear immutable bit. Sure it only works on ext2 but how far do you
>want to take this thing?
In a private email, linux@horizon.com wrote:
>No; we should add some more magic-symlink /proc entries, like
>/proc/<pid>/fd/<n> for swap files. Then they can be accessed
>by swapoff even if they're deleted.
Seems like a good idea to me...
--
This message has been brought to you by the letter alpha and the number pi.
Open Source: Think locally; act globally.
David Feuer
David_Feuer@brown.edu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: swapoff weird
2000-12-10 9:10 ` David Feuer
@ 2000-12-15 18:32 ` Pavel Machek
0 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2000-12-15 18:32 UTC (permalink / raw)
To: David Feuer, linux-kernel
Hi!
> >[David Feuer]
> > > Perhaps it would be good to put a check in unlink to make sure that
> > > this is not the last link to a swapfile.
> >
> >Much better to add code to /sbin/swapon and /sbin/swapoff to set and
> >clear immutable bit. Sure it only works on ext2 but how far do you
> >want to take this thing?
>
> In a private email, linux@horizon.com wrote:
>
> >No; we should add some more magic-symlink /proc entries, like
> >/proc/<pid>/fd/<n> for swap files. Then they can be accessed
> >by swapoff even if they're deleted.
>
> Seems like a good idea to me...
We could make them opened by kswapd.
Pavel
--
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2000-12-15 20:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-09 21:24 swapoff weird Pavel Machek
2000-12-09 21:41 ` Rik van Riel
2000-12-09 22:06 ` Pavel Machek
2000-12-09 22:41 ` David Ford
2000-12-09 22:46 ` David Feuer
2000-12-10 7:56 ` Peter Samuelson
2000-12-10 9:10 ` David Feuer
2000-12-15 18:32 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox