lkml.org 
[lkml]   [1998]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: crazy swapping
From
Date
Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> writes:

>
> When you create a file that have holes (using
> creat();lseek(10000000);write("xxx");close()), and make it swap file,
> system crashes and you get "rw_swap_page: bad swap file" message. Tested
> on 2.0.33 and 2.1.129.
>
> Mikulas Patocka

From man mkswap:
[snip]
To setup a swap file, it is necessary to create that file
before running mkswap . A sequence of commands similar to
the following is reasonable for this purpose:

# dd if=/dev/zero of=swapfile bs=1024 count=8192
# mkswap swapfile 8192
# sync
# swapon swapfile

Note that a swap file must not contain any holes (so,
using cp(1) to create the file is not acceptable).


[snip]


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:2.448 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site