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
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to