On Fri, 15 Oct 1999, Andrew Hately wrote:

> "David J. Kanter" wrote:
> > 
> > I'd like to make a new partition for /var because I don't have enough drive
> > space where /var is currently mounted (/) to run apt-get dist-upgrade.
> > What's the best way of doing this? I can create a new /var partition because
> > I've got plenty of available drive space, but what set-up files will I have
> > to modify to make sure things go smoothly?
> > 
> > I assume I'll have to change fstab. But then do I have to move all contents
> > of the current /var to the new /var? Could I create the new partition using
> > a temporary name, move all the /var stuff to it, then rename it to /var?
> 
> Thats what I would suggest.
> Stop everything you can, copy the contents and do the final swapover in one
> line, just in case
> # mv /var /old_var ; mv /new_var /var
> 

I'd like to expand on that last paragraph.

1) stop everything you can -> go into single user mode
   close all user programs (i.e. tidy up)
   then as root:  telinit 1

2) copy the contents -> if you use the 'cp' command you're likely to mess
   with file ownership and permissions.  The command I use is this:
   cd /mnt  <-- where the new /var partition is currently mounted
   (cd /var; tar cfp - [list of directories]) | tar xfp -

3) once you're done, go back to normal runlevel
   as root: telinit 2
   (change the number depending on what runlevel you usually live in - you
   can find this on the initdefault line of /etc/inittab)


dave


--
   |     oOOooO           /  
 --|    oOobodoO        /   [EMAIL PROTECTED]
 --|     ooOoOo       /    
   |       II       /     The wise man tells you where you have fallen
   |       II     /      and where you may fall - Invaluable secrets.

Reply via email to