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

Re: How to get away with small /var partition



on Fri, Nov 28, 2003 at 02:43:10AM -0500, Walter Dnes (waltdnes@waltdnes.org) wrote:
> I've been lurking for a couple of weeks here.  I started switching
> over to Debian in September because Redhat was dropping RH7.3 (their
> best distro ever, and it was damn good) and replacing it with
> bloatware and coming up with "version-du-jour" on a pace to beat
> Microsoft.  I want to *USE* my computer, not be constantly upgrading
> upgrading upgrading.  (Yes, I *LIKE* "rusty" and "stale" <g> ).
> Anyhow, on to my question.
> 
> When I install the latest Debian on my "B" machine (450mhz, 128 megs
> RAM), I want to be able to use a small /var partition.  With Redhat, I
> used...

The one thing you *don't* say is how much space you've got on the disk.

> 1 => /  (3 gigs)

I'd split that as:

   /:       150 MiB
   /tmp:    150-250 MiB.
   /usr:    3 GiB


> 2 => extended partition (the rest of the harddrive)
> 5 => swap   (256 megs)
> 6 => /var   (256 megs)
> 7 => /misc  (the rest of the harddrive)

I'd dump /misc and make it /home.  For a workstation.

>   After a virgin install, I log on as root and...
> 
> mv /home /misc/home
> ln -s /misc/home /home
> 
>   What's nice is that when I go to a newer version, I can reformat the
> 1st partition and install the new version.  Then I log on as root and...
> 
> rm -r /home
> ln -s /misc/home /home
> 
>   And I'm back in business.  And since I'm running my machine only for
> me, mutt and slrnpull spool directly to my user dir.
> 
>   My understanding is that Debian loads a whole slew of packages in /var
> during the main install and I need to have at least a gig of space.  Is
> that correct ?  Which directory ?  Is it possible to symlink that
> directory elsewhere ?

Mostly:  your apt cache archive, in /var/cache/apt/archives.

    # df -h 
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/hda2              99M   80M   15M  85% /
    /dev/hda1              38M   11M   26M  30% /boot
    /dev/hda9             259M   49M  211M  19% /tmp
    /dev/hda10           1004M  450M  555M  45% /var
    /dev/hda11            3.0G  2.4G  624M  80% /usr
    /dev/hda12           1004M  220M  785M  22% /usr/local
    /dev/hda13             12G  3.9G  7.4G  35% /home

    # cd /var
    # du -s * | sort -nr
    201435  cache
    141533  lib
    51029   tmp
    29073   log
    17465   account
    5641    www
    4757    backups
    1732    spool
    282     run
    26      games
    17      mail
    5       lock
    1       opt
    1       local
    1       autofs

...that's with a recently cleaned out package cache.  More often I'm
running ~75-85% utilized in /var, and a major update can suck up more.

You *can* get by with a smaller cache, most of the time, if you use the
"--no-download" option after you run out of space in /var, then flush
cache with "apt-get clean".  You can also use a remote archive mounted
via NFS, or an apt-proxy cache, in some cases.

Alternatively, symlink this directory to a larger partition.  If you've
got relatively little space, I'd allocate 3-4 GiB to /usr and symlink
/var to /usr/var (which doesn't exist otherwise).

Or you could just give yourself One Big Partition and deal with the
attendant problems.


There's a short FAQ on GNU/Linux system partitioning you may find
useful, at:

    http://kmself.home.netcom.com/Linux/FAQs/partition.html


Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   Data corrupts.  Absolute data corrupts absolutely.
    -- Ed Self's corollary of Atkinson's Law.

Attachment: pgp8TEgR2cO11.pgp
Description: PGP signature


Reply to: