[Freedombox-discuss] Occasional freezes

Sunil Mohan Adapa sunil at medhas.org
Thu Jan 31 18:38:27 GMT 2019


On 31/01/19 12:53 am, permondes - sagen wrote:
> Oh Sh....
> Swap files are not allowed on btrfs
> 
> manpages say:
>> *swapon* may not work correctly when using a swap file with some
>> versions  of *btrfs*. This is due to btrfs being a copy-on-write
>> filesystem: the  file location may not be static and corruption can
>> result. Btrfs actively  disallows the use of swap files on its
>> filesystems by refusing to map the  file.

swap file support seems to have been added to btrfs with Linux kernel
5.0[1]. I wonder if it would be stable enough right away.

> 
> So I have to generate a swap partition on a micro-SD card. I think to
> have read this was discouraged because wear leveling was then inefficient.
> 

I don't not think that filesystems keep moving the swap file blocks
after they are created. So, I would assume that the wear a swap file
would cause is same either within a filesystem or in a separate
partition. Also setting vm.swappiness to smaller value will cause swap
to be used only under dire situations.

Links:

1) https://btrfs.wiki.kernel.org/index.php/Project_ideas#Swap_file_support

-- 
Sunil

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/freedombox-discuss/attachments/20190131/0f9e5493/attachment.sig>


More information about the Freedombox-discuss mailing list