Moving /var to a new volume.

Steven Hanley sjh at svana.org
Fri Jun 7 15:07:03 EST 2002


On Thu, Jun 06, 2002 at 05:51:15PM +1000, Sam Couter wrote:
> Chris Fletcher <cf at netspeed.com.au> wrote:
> > I am sure this has happend to many people at some time or another.  We have
> > a freeBSD server and the /var volume has filled up.  We have plenty of room
> > on the /usr volume so we would like to move it to there.
> > 
> > Can anyone point me in the right direction on how to acheive this without
> > destroying the server :-)
> 
> Boot to single-user mode, or shut down as much stuff as you can.
> 
> Move, copy, whatever. Set up symlinks or bind mounts or whatever you
> want so that /var actually appears at /var.
> 
> Reboot or restart stuff. Reboot if there was stuff you couldn't shut
> down (logging daemons and stuff, perhaps), as the file handles those
> programs have open will become invalid.

upp not really, once a program has a file open you can move the file around or
delete it and it will still be available as the kernel still provides that to
the process that opened it. It is not until the file handle is closed that the
file with no longer be in the place or the file will dissapear from that
path. Once a file is opened the path is not relevant. (this is a unix thing,
all unix variants supposedly do it this way)

But yes a reboot will really be easier than messing around with life
filesystem and daemons for something like this.

        See You
            Steve

-- 
sjh at wibble.net http://wibble.net/~sjh
You are subtle as a window pane standing in my view
but I will wait for it to rain so that I can see you
   Anticipate - Ani




More information about the linux mailing list