[Grok-dev] grokproject error

Brandon Craig Rhodes brandon at rhodesmill.org
Wed Jan 21 09:40:55 EST 2009


Milos Negovanovic <milos.negovanovic at googlemail.com> writes:

> Buildout was using /tmp as temporary storage for downloaded
> files. Doing a quick 'rm -rf /tmp && ln -sf /var/tmp /tmp' fixed it.

Years ago, back in the 1990s, I had a Red Hat system (I have since
become a Debian man, and have hung on so far despite their security
fiasco last year), and it would never upgrade correctly, but give
obscure errors about unpackaging.  It turns out to have been because of
exactly such a symlink between /tmp and /var/tmp!  The reason was that
upgrading ran certain tasks before the filesystem was mounted, at which
point there was no /var/tmp for the symlink to point to:

  With everything mounted:
    /tmp -> /var/tmp
    /var mounts the "var" file system
    /var/tmp therefore exists

  With only the root filesystem mounted:
    /tmp -> /var/tmp
    /var is just an empty directory
    /var/tmp does NOT exist!

The solution, after years and years of these broken upgrades (and my
thinking that Red Hat was at fault!), was to create a /var/tmp directory
on the root filesystem, so that it existed whether all filesystems were
mounted or not.  Thus:

 # init 1     (single-user mode)
 # umount /var
 # mkdir /var/tmp
 # mount /var
 # init 3     (back to multi-user mode)

Also, certain operations during boot would fail if they needed /tmp
before /var/tmp was mounted.

Of course, if a task is only partway done with its file in /tmp then
/var gets mounted over it, I guess the file disappears; but on my
system, at least, boot scripts were run serially, so that never seemed
to create a problem.

-- 
Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon


More information about the Grok-dev mailing list