SUMMARY: Moving /var

From: Larry Anta (lanta@acs.ryerson.ca)
Date: Mon Feb 01 1999 - 12:42:13 CST


The original question was:

On Fri, 29 Jan 1999, Larry Anta wrote:
> Looking over the faq and the archives I came across this procedure for
> moving /var:
>
> 1. boot into single-user mode
> 2. mount /dev/dsk/c0t1d0s7 /mnt
> 3. cd /mnt
> 4. ufsdump 0f - / | ufsrestore if -
> (at restore prompt, type 'add var', then type 'extract', when that
> finishes type 'quit')
>
>
> I appreciate the terseness of the procedure but I find step 2 a bit vague. I
> suspect /dev/dsk/c0t1d0s7 is where we want to move /var *to*, not where we're
> moving it *from*.
>
> Would someone please confirm this for this Solaris newbie? Many thanks!

Summary of responses:

I was pleased to discover two things: My suspicion that /dev/dsk/c0t1d0s7 is
the *target* and not the *source* for the data movement was correct.

Secondly, even some seasoned pros agreed with me that the procedure, as
stated, is a bit vague (and therefore dangerous!). I offer this revised
version:

====================START==============
Assumptions:

a) disk slice /dev/dsk/c0t0d0s3 contains a ufs mounted at /var
b) we want to move it to a larger slice, /dev/dsk/c0t1d0s3

Procedure:

Step 1: Make a new filesystem at the target location (/dev/dsk/c0t1d0s3).
        format...
        partition...
        newfs...

Step 2: Boot into single-user mode.

Step 3: Mount the destination slice ('mount /dev/dsk/c0t1d0s3 /mnt')

Step 4: Copy source to destination:
        Step 4A: 'cd /mnt'
        Step 4B: 'ufsdump 0f - /var | ufsrestore rf -'

Step 5: vi /etc/vfstab (to reflect /var's new slice-location)

Step 6: reboot the server
====================END==============

Many thanks to the following:

David Evans
Stephen Harris
Paul H. Yoshimune
Richard Smith
Rik Schneider
Amjad Zamil
Steve Elliott
Marina Daniels
Scott D. Yelich
Padraig Houlahan
Alex Goodson
Alan Reichert
Richard Butler
Earl R. Cooke
Danny Johnson
Joydeep X Mukherjee

I'd also like to thank the Academy. :)

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@ Larry Anta, Ryerson Polytechnic U., Toronto, Canada @@@
@@@ lanta@acs.ryerson.ca www.ryerson.ca/~lanta @@@
@@@ #include <std/disclaimer.h> @@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:14 CDT