All of lore.kernel.org
 help / color / mirror / Atom feed
From: dima <dolenin@parallels.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: swapfile on btrfs, temporary solution for wiki
Date: Fri, 25 Oct 2013 18:36:45 +0900	[thread overview]
Message-ID: <526A3BAD.3010202@parallels.com> (raw)
In-Reply-To: <CAGqmi74F9GurJL73qtU4JG+Fi4RbXE7tiaO1uEQqEY2ym278eA@mail.gmail.com>

On 10/25/2013 05:52 AM, Timofey Titovets wrote:
> Hello, i suggest temporary solution to use swap file under btrfs.
> I test it, and it work good.
>
> I invent simple the way, how create and using swap file, just see
> following sh code:
>
> swapfile=$(losetup -f) #free loop device
> truncate -s 8G /swap   #create 8G sparse swap file
> losetup $swapfile /swap #mount file to loop
> mkswap  $swapfile
> swapon  $swapfile
>
> i just adding this to rc.local and this work good.
> May be, add it to btrfs Wiki as temporary solution to using swap file?
>
> Timofey

Hi,
Yes, Timofey, it does work. I tested the same over a year ago. And it 
does say briefly about this option in wiki

https://btrfs.wiki.kernel.org/index.php/FAQ#Does_btrfs_support_swap_files.3F
"A workaround, albeit with poor performance, is to mount a swap file via 
a loop device."

best

  reply	other threads:[~2013-10-25  9:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21 20:37 swapfile on btrfs, temporary solution for wiki Тимофей Титовец
2013-10-24 20:52 ` Timofey Titovets
2013-10-25  9:36   ` dima [this message]
2013-10-25 10:35   ` Roman Mamedov
2013-10-25 10:44     ` Hugo Mills
2013-10-26  9:28       ` karim.allah.ahmed
2013-10-26  9:30       ` karim.allah.ahmed
2013-10-26 11:50         ` Hugo Mills
2013-10-26 14:11         ` Duncan
2013-10-30 15:54   ` David Sterba
2013-10-30 20:11     ` Timofey Titovets
2013-10-30 20:12       ` Timofey Titovets

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=526A3BAD.3010202@parallels.com \
    --to=dolenin@parallels.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.