On Tuesday 07 February 2012 15:50, in comp.os.linux.security,
st...@gmx.de
wrote:
> Any hints on how to prevent a tmpfs file system to be written to the swap
> partition? Other than omitting a swap partition completely, of course. I
> do not want some files to end up on the hard disk.
I'm afraid that you can't do that.
To quote /usr/src/linux/Documentation/filesystems/tmpfs.txt
"Since tmpfs lives completely in the page cache and on swap, all tmpfs
pages currently in memory will show up as cached."
tmpfs lives in cache and swap. There are no tmpfs tuning parameters to
prevent tmpfs pages from being written to swap (mount(8) only lists size=,
nr_blocks=, nr_inodes, and mode= (initial permissions) ), tmpfs will be
written to swap, with the same rules as any other cache.
Sorry
--
Lew Pitcher