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

Re: Jessie and /var

On Sat, 4 Apr 2015 16:35:02 -0600
Bob Proulx <bob@proulx.com> wrote:

> 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.

I set /var much bigger, because I intend to have several VMs and
containers there. But I know what images are to be stored there and how
big they are, so I could figure it out pretty accurately.


> > > > 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.

I rarely actually use the VMs on that machine, and I didn't want to
bother converting them to logical volumes, so I just left everything
in /var. This may change in the future, as I left some space in the VG
mostly for this purpose.

On my workstation I have now also set up LVM on a spare disk, that I
intend to use mostly for VMs. So far, I have kept them as images on an
SSD, so performance has been good.

> > 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?

Just a personal preference. I just prefer instantly knowing what
partition everything is on, and to me, symlinking can make things a bit
"messy". I think this is related to the fact that I have Aspergers.
Some things can be harder to wrap my head around.

> 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.

That was a good idea, I didn't think of that. Thank you.

> 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.

I will keep a mental note of that.

> > 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

Of course. :)

> 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.

Yes, I was seriously wondering about installing apt-cache-ng. I have
plenty of bandwidth, but there is absolutely no point in wasting more
than I need.

Will that also cache packages for other architectures? I have a Pi,
running Raspbian - will it cache packages for that too, or just the
multi-arch ones?

>   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.

It is :) Can't believe I haven't tried it before, it's so much nicer to
sit at a proper workstation and do the install.

Thank you for all the advice, I'm now going to carefully read the
manpage on "mount" and learn more about bind mounting :)



"I'm ionized"
"Are you sure?"
"I'm positive."

Attachment: pgpF6cPaDG5bA.pgp
Description: OpenPGP digital signature

Reply to: