Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Dec 2000 16:55:12 -0600 (CST)
From:      Mike Meyer <mwm@mired.org>
To:        Christopher Farley <chris@northernbrewer.com>
Cc:        Mike Meyer <mwm@mired.org>, questions@freebsd.org
Subject:   Re: Weird /tmp issues
Message-ID:  <14897.26320.177634.47724@guru.mired.org>
In-Reply-To: <20001208164327.A541@northernbrewer.com>
References:  <95144528@toto.iv> <14897.23726.262612.101525@guru.mired.org> <20001208164327.A541@northernbrewer.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Christopher Farley <chris@northernbrewer.com> types:
> Mike Meyer (mwm@mired.org) wrote:
> > Christopher Farley <chris@northernbrewer.com> types:
> > I run tmp on swap (via mfs), and it works fine. However, it gets
> > recreated *on reboots*. I didn't see you talk about a reboot - have
> > you tried that?
> Oh yes. And even after a reboot, /tmp is filled with all kinds of crap,
> namely those unix domain sockets and lockfiles created by X.

You should leave the thread on -questions so other can play.

> > X creates lock files and unix domain sockets in /tmp. If you don't
> > want to reboot with the new /tmp in place, you might try moving
> > /tmp.old/.X* to /tmp.
> The sockets have been causing trouble. When I tried to mv /tmp /usr/tmp,
> I get an "Operation not permitted" on every socket. I have not tried to
> move the sockets separately.
> I can mv /tmp all over the root filesystem, of course; just not to any
> other filesystems. (I assume mv renames if the target filesystem
> is the same as the source, and copies the files otherwise.)

You can't really "mv" files from one file system to another; in that
case mv calls cp(1) for you (it's in the man page). That doesn't work
very well on sockets.

> Those sockets remain even after a reboot; even if I don'r run X.
> Is this normal? I would think if you shutdown X, it would remove
> all its lockfiles and sockets. It seems as if X requires those
> sockets to run, because if I move /tmp, my display and keyboard
> both fail until a reboot.

I'd think that about X as well, but I'm not an X guru. If you're not
cleaning out /tmp at reboot, then you should: "shutdown -r"; when it
comes up, don't go multi-user, go single-user. Then mv /tmp to
/tmp.old (I'd suggest *deleting* the old /tmp) and create the new /tmp
appropriately. That got lost in here, but it's a symlink to another
fs, right?

> I searched deja.com regarding this issue, and found a message from
> someone who said "I like to move /tmp to a diferent filesystem before X
> has a chance to establish sockets there."

Which is pretty much what I outlined above. Moving /tmp to /tmp.old
*should* make X recreate them when you start it, providing that you've
rebooted the system in between.

If you've done that, then I'd seriously suggest removing the things.

> Christopher Farley

Ok, I can't resist - I get asked what I working with Dana Carvey is
like regularly. Do you get asked what it's like being dead?

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Unix/FreeBSD consultant,	email for more information.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14897.26320.177634.47724>