[NCLUG] ipchains question

Mark Sizer mrsizer at home.com
Sat Apr 21 17:08:19 MDT 2001


Thanks. It's a local machine so the console/reboot method should work 
fine.

- Mark

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 4/21/01, 5:09:06 PM, R P Herrold <herrold at owlriver.com> wrote regarding 
Re: [NCLUG] ipchains question:


> On Sat, 21 Apr 2001, Mark Sizer wrote:

> > How can I move /tmp?
> >
> > It always has locked stuff in it. I'd love to get it off the / partition,
> > but how do I get rid of the original? Boot to a different run-level? I
> > normally run at 5.

> Gotta kill the locking processes, and clean house.  Three
> answers:

> A. Local console --

> 1.  Change to run level 1
>      init 1

> (system kills off all stray processes, and eventually displays
> a # prompt)

> 2.  Clean out the current /tmp
>      cd /tmp ; rm -rf * ; rm -rf .[a-zA-Z0-9]*

> (this removes all files and directories -- the second rm NEEDS
> to ignore '..' so we require that the second character be a
> letter of number -- SERIOUS damage will really if you
>    rm -rf /tmp/..
> [that is of course '/' and is your whole system])  -- it
> perfectly to   cd /tmp ; ls -al   and kill off each file or
> directory in turn.)

> 3.  Prepare a new partition -- we'll call it  /dev/hdb1

> 4.  Add a line with /dev/hdb1 to  /etc/fstab   for an explicit
> /tmp mount.

> 5.  Reboot or   init 5   -- as long as I was local, I'd
> probably just reboot ...

> 6  Done

> -----------

> B.  Remote console:

> (The system I am looking at is Red Hat box, and the
> /etc/inittab runs this process once at boot time:
>    /etc/rc.d/rc.sysinit   with this line:)

> si::sysinit:/etc/rc.d/rc.sysinit

> See:  man init

> 1.  Do Example A, steps 3 and 4 above.

> 2.  Insert a line in rc.sysinit toward the top, of the form in
> Example A, line 2.

> (This must run BEFORE the mounts occur ...)

> 3.  Reboot

> --------

> C. Hard way in X, with a remote system

> 1.  Kill off all daemon processes which hold files open in
> /tmp -- lsof is your friend in identifying them -- The XFS
> will be really a b*tch on a target host, for local X sessions
> use it.

> 2.  I would instead have it switch to run level 3, and pop
> open a console (without SSH X forwarding) using    init 3

> and then go process killing.

> 3.  Example A, item 2, again

> 4.  Example A, items 3 and 4, again

> 5.  Mount the new /tmp partition

> 6.  Change back to R/L 5    init 5

> (No reboot -- uptime is preserved -- see:
>    http://bopper.wcbe.org/uptime.txt   )

> ... I run systems all over the country, and X is ususally NOT
> running on the servers I admin ... it eats performance and
> makes a host more fragile.

> -- Russ

> _______________________________________________
> NCLUG mailing list
> NCLUG at nclug.org
> http://www.nclug.org/mailman/listinfo/nclug



More information about the NCLUG mailing list