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

Re: Jessie and /var



Petter Adsen wrote:
> Jerome BENOIT wrote:
> > Petter Adsen wrote:
> > > I am preparing to set up Jessie on my home server today, with mdadm
> > > RAID and LVM. Even though I am using LVM, I want to get the volume
> > > sizes about right when I first set them up.

You can always expand the volume very trivially.  You can't shrink it
easily however.  So don't go crazy-too-large or you will have
unusuable space.  A comfortable amount is fine.  Here are some very
active systems of mine.  In review now I could probably bump up the
space there a little bit but at the same time those haven't had space
issues ever either.

  Filesystem          Size  Used Avail Use% Mounted on
  /dev/mapper/h3-var  2.8G  2.2G  478M  83% /var

  Filesystem          Size  Used Avail Use% Mounted on
  /dev/mapper/h9-var  2.8G  1.8G  853M  69% /var

  Filesystem            Size  Used Avail Use% Mounted on
  /dev/mapper/t4-var    5.5G  1.2G  4.1G  23% /var

> > > VM images and containers are stored under /var - is there anything
> > > else that systemd stores under /var that might take up enough space
> > > that I should be aware of when setting up?
> > 
> > why not mount a dedicated partition inside /var  for such usage ?
> > /var/local ?

I mount an additional volume at /var/lib/libvirt/images in order to
handle the image sizes.  Or with LVM build the VM images directly in a
logical volume.  That is the recommendation for performance anyway.

> That is a possibility, but I will either:
> 
> a) simply set up a /var large enough for all I need, or
> b) symlink to /srv, if necessary
> 
> I am hoping to avoid symlinking, though.

Why do you want to avoid the symlink?

Alternatively use a bind mount.  This is what I do system.  In this
example I had a large /home partition and I wanted to share the space
there.  I bind mounted /home/images to /var/lib/libvirt/images.

The /etc/fstab entry:

  /home/images /var/lib/libvirt/images none bind 0 0

This will create an error on purge because the postrm can't remove the
directory but since we know what we did that is okay to ignore and
cleanup after the package purge.  Understand and ignore it.  I don't
have plans to purge the production use of this anytime soon.  Just
noting it for the record.

> But what I was wondering is if there is anything other than
> containers/VM images that systemd introduces in /var that takes a
> significant amount of space?

It depends completely upon what you install.  Everyone will install a
different set of things.  As David mentioned apt-cacher-ng caches
packages and will consume in its cache up to the configured size.  On
my other machine with it installed I have it using its own logical
volume.

  Filesystem            Size  Used Avail Use% Mounted on
  /dev/mapper/vg1-acng  9.9G  3.3G  6.2G  35% /var/cache/apt-cacher-ng

> BTW: Whoever came up with the ability to do parts of the installer via
> ssh - thank you, thank you, thank you! :) _Very_ convenient, I just
> hadn't actually tried it before.

That is a pretty cool feature.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: