Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 1999 15:41:04 -0500 (CDT)
From:      "Paul T. Root" <proot@iaces.com>
To:        andriss@andriss.com (Andriss)
Cc:        proot@iaces.com, questions@FreeBSD.ORG
Subject:   Re: SCSI drive mirroring question
Message-ID:  <199909132041.PAA06823@iaces.com>
In-Reply-To: <Pine.BSF.4.10.9909131443130.26816-100000@netmint.com> from Andriss at "Sep 13, 99 02:44:56 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
In a previous message, Andriss said:
-- Start of PGP signed section.
> Hello,
> 
> Paul, the script you enclosed seems to be tailored to a
> particular file system or installation. Am I wrong?

No, it's generic. I have it running on several Solaris machines
and a couple of FreeBSD boxes. Deciphering the online.dat file
is the secret.

What you need to do is define your file systems.

1) define shell variables for all of your file systems
(I have mine as BROOT BUSR BX11 and BLOCAL) and put these
is SLIST and HLIST. 

2) Define the mount points in SFS and HFS. The SFS points are relative
to HFS. So everything is mounted inside of /broot in my case. 

3) Define MOUNT order. Order counts obviously. All backup FSs are newfs'd 
and fsck'd, then HFS is mounted, SFS mount points are created, mounted
and then dump/restore is run to them.
   /broot first, then /broot/usr, then /broot/usr/X11R6, etc.

3) Define the Remount order. Sub-directories need to be remount first and
then up. So /broot/usr/X11R6 then /broot/usr then /broot.

4) Lastly, define the devices for the backup files systems from the HLIST and
SLIST variables. For me those are BROOT, BUSR, BX11 and BLOCAL.

5) That's it.


# Online backup data file for Horton
#
#  This is the current fstab for Horton
# 
#  Device	Mountpoint	FStype	Options	Dump	Pass#
#  /dev/sd0s1b	none		swap	sw	0	0
#  /dev/sd0s1a	/		ufs	rw	1	1
#  /dev/sd0s1f	/usr		ufs	rw	2	2
#  /dev/sd0s1g	/usr/X11R6	ufs	rw	2	2
#  /dev/sd0s1h	/usr/local	ufs	rw	2	2


# List of Filesystems
export SLIST HLIST LIST
SLIST=" BUSR BX11 BLOCAL"	# list of shell variables
HLIST="BROOT"			# Head of  backup file system shell variables
LIST="$HLIST $SLIST"		# list of all backup FS shell variables

# mount points
export HFS SFS FS SRCFS
HFS="/broot"			# mount point for Head backup file system
SFS="usr/local usr/X11R6 usr"	# rest of the mount points (relative to $HFS)
FS="$HFS $SFS"			# list of all mount points
SRCFS="/ /usr /usr/local /usr/X11R6"	# the real file systems

# Mount Order
export MOUNT REMOUNT
MOUNT="usr usr/local usr/X11R6"		# Order to mount FS before dump
REMOUNT="usr/local usr/X11R6 usr"	# Order for remounting to read-only

# Map devices to logical names
export BROOT BUSR BX11 BLOCAL
BROOT='sd1s1a'
BUSR='sd1s1f'
BX11='sd1s1g'
BLOCAL='sd1s1h'



> >Try dump/restore.  Enclosed is my script and data file for it. Fill out
> >the data file for your file systems
> 
> How do you do a bit by bit mirror using dump or some other tool?

dump or cpio will do it.


> Thanks for your help...
> 
> Andriss
> 
> --
> ______________________________________________________________
> Andrey Kholodenko <andriss@andriss.com> http://www.andriss.com
> Download My Public PGP Key From http://www.andriss.com/pgp.txt
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- End of PGP signed section, PGP failed!


-- 
The baby threw up all over my dress and we had to go home first to change.
--from "Excuses, Excuses" *the* compendium of excuses by Leigh W. Rutledge


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909132041.PAA06823>