Francesco Potorti` wrote:
I remember  having seen on  this list a  message saying that making  a swap
file on a filesystem residing  over a raid device was not possible/reliable
(because of a race condition in the kernel?).

Unfortunately, my own archive of the list only contains a pass-by reference
to such a discussion, and I cannot find archives of the list.

May some kind soul point me in the right direction?  Does an archive of
this list exist?
 

Well, I started a thread a while back discussing this issue and since then I have
discovered that it is perfectly reliable. Just create a normal raid device, I use
raid1, and go through the usual process to make a swap device of it. A file on
a raided file system should work just as well.

There is something which I discovered during the testing of swap on raid which
I thought was a problem with raid but which turns out to be something more
fundamental with linux's use of memory/swap. I wrote a simple perl script which
doubles its memory allocation each time up to a certain maximum and then ran
lots of these processes from a script. After a short period of swapping - less than
5 minutes - the system would hang. The Alt-SysReq hot key could do nothing
to unmount or sync and the system had to be rebooted. I have not run this test
recently but it is a little worrying that a user space program can bring down our
favourite operating system. It does not seem that it is just slow but is actually
hung. Maybe this has been fixed recently. If anyone knows that this is a known and
being-worked-on or fixed problems maybe you can send a note to the list. If
anyone knows that this isn't then perhaps you can tell me the correct authority to
report the problem to.

This is a sidetrack, anyway. The long and the short of it is that swap on raid works
as well as swap not on raid so just do it.

Brian Murphy

Reply via email to