Rob van der Heij wrote:
On 10/12/07, John Summerfield <[EMAIL PROTECTED]> wrote:

I've tried using a sparse file for swap, but Linux wouldn't let me.
Depending on how swap is managed, that could do it.

Where would the sparseness be? And how would it help you?
My foot still hurts from an attempt to swap to ramfs ;-)

Blocks get allocated when written on. One can see the diff:

 16:47 [EMAIL PROTECTED] ~]$ \ls -Sslh /tmp/sparse
4.0K -rw-rw-r-- 1 summer summer 400M Oct 12 16:47 /tmp/sparse
16:48 [EMAIL PROTECTED] ~]$
If that were a swap file, the 4.0K would increase as more blocks are
used, but never decrease.


16:48 [EMAIL PROTECTED] ~]$ /sbin/mkswap /tmp/sparse
Setting up swapspace version 1, size = 419426 kB
16:49 [EMAIL PROTECTED] ~]$ \ls -Sslh /tmp/sparse
16:49 [EMAIL PROTECTED] ~]$ sudo swapon /tmp/sparse
Password:
swapon: Skipping file /tmp/sparse - it appears to have holes.
16:50 [EMAIL PROTECTED] ~]$



--

Cheers
John

-- spambait
[EMAIL PROTECTED]  [EMAIL PROTECTED]

Please do not reply off-list

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to