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

Re: /var tmpfs ?



Hi,

/var/lib contains a huge load of stuff that is not supposed to change
between boots, like dpkg's state (package selections), the calibration
constants for the clock, etc.

In general, these days, putting any system partitions besides /var and /home
(and maybe /boot) on a different device is just asking for problems without
benefit.  And the benefits of /var are slim, as Debian doesn't really support
readonly rootfs well.

Cheers,

Sebastian



On Mon, Oct 22, 2018 at 03:37:45PM +0200, Michael wrote:
> Matus,
> 
> I don't totally need to make /var a tmpfs, it's just out of curiosity, and for the simplicity of configuration. Since /var/cache and /var/log are already tmpfs for me, and this extendet tmpfs setup works fine since at least 2 years, it seems to be interesting to check the other top folders of /var for that option too.
> 
> > On 22.10.18 10:02, Michael wrote:
> > >Recently made a lot of stuff tmpfs (like /tmp and /var/cache and $HOME/.cache) and i'm not sure about this ...:
> > >
> > >Is there any reason why /var cannot be completely tmpfs ?  
> > 
> > /var contains huge amount of data that keep changing but must not be lost.
> 
> ok, but shouldn't /var contain no configuration-like files ? In other words, are these all files to read or are they just only re-created everytime, thus only to write ? If so, then perhaps could i live with some extra time for starting services / apps to re-create things (if it's only within a second).
> 
> For example, here are my /var topfolders:
> 
> apt		-> empty
> backups	-> write-only; and i did never need these in about 15 years, so i guess i can live without.
> cache	-> already tmpfs
> lib		-> don't know XXX  
> local		-> empty
> lock		-> only a lockfile
> log		-> already tmpfs for me (if i ever need persistent logs, for specific reason, i'll just revert it. It's a desktop machine, rarely problems.)
> mail		-> don't need
> opt		-> empty
> run		-> already tmpf via Debian
> spool	-> cron/anacron, cups .... i guess, no need for persistent
> tmp		-> empty
> www	-> not used here
> 
> That leaves /var/lib as a main candidate for problems, because i don't know the usage of what is stored here. 
> 
> 
> 
> ps. About /var/cache/apt, it is mounted as separate 5G partition. /tmp already is made tmpfs.
> 

-- 
Best regards,               | Theoretische Physik 1, 02.573
  Sebastian Kapfer          | FAU Erlangen
                            | Staudtstr. 7, 91058 Erlangen, Germany
                            | Phone: +49.160.9577.6436
                            | https://theorie1.physik.fau.de/people/skapfer/
                            | GPG: ED891239B22DD0D516F2D9247554541B84406C3F

Attachment: signature.asc
Description: PGP signature


Reply to: