[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mount /var & /tmp on tmpfs?

On Tuesday 09 December 2008, 03:19:23, T o n g wrote:

> On Tue, 02 Dec 2008 08:30:58 +0100, Marco Amadori wrote:
> >> I'm using debian-live on my usb stick with persistence. In order to
> >> decrease writing times on the stick, can I mount /var & /tmp on a
> >> ramdisk? tmpfs? How can I do that?

> > This should be already in place, look at live-initramfs manpage, under
> > "files" section.

> Hi Marco, is the following "files" section that I'm looking at the same
> as yours?

Yes, and no, the latest version of the manpage says:

----- . ------
> |
> |       /etc/live.conf
> | 
> [...] 
> |       /live/filesystem.module
> [...]


This optional file (which resides in the rootfs system, not in the live media)
is used as a list of directories which not need be persistent: ie. their
content does not need to survive reboots when using the persistence features.

This saves expensive writes and speeds up operations on volatile data such as
web caches and temporary files (like e.g. /tmp and .mozilla) which are
regenerated each time. This is achieved by bind mounting each listed directory
with a tmpfs on the original path.
----- . ------

And there is an example under /usr/share/doc/live-initramfs/example directory:

----- . ------
# /etc/live-persistence.binds example
# If this file is present in the proper path, each uncommented not empty line
# will be treated as a directory which should not be made persistent and
# which it's content should be volatile.
# This is achieved by bind mounting on it a tmpfs clone of the directory
# specified

# Exclude some standard temporary paths

# Firefox profiles are not always useful to remember
----- . ------


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply to: