SUMMARY: Moving /var

From: Marco Greene (
Date: Tue Sep 15 1998 - 15:52:48 CDT

WOW, that was fast, in less than 1/2 hour I had more ways to do this then
ever imagine.

Thanks to all those who helped:
Eustace Fernandes
Douglas Palmer []
Jamie Lawrence
David Stern
John Bradley []
Cooke, Earl R.
Nikos George []
Kris Briscoe []
jbb []
Sean Ward []
Christopher M. Conway []
Rick Niziak []
Phil Kao []

Here are the two most common responses:

1) Use tar in the following manner
Goto single user mode
mount /dev/dsk/c0t1d0s7 /mnt
cd /
tar cf - ./var | (cd /mnt; tar xpf - )
mv /var /var.old

To do it cleanly, I'd boot up in single user mode, do the mount like you
have done, then do:

cd /mnt
ufsdump 0f - / | ufsrestore if -

At restore prompt, type
add var
then type
when that finishes, type
to exit.
Now, modify the /etc/vfstab to mount the appropriate var partition; I'd
probably rename /var to /, and then mkdir /var. That way you've
got the old in case something weird happened. Then reboot, and you should
be set.

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:49 CDT