From owner-freebsd-questions Mon Sep 13 13:41:41 1999 Delivered-To: freebsd-questions@freebsd.org Received: from iaces.com (horton.iaces.com [204.147.87.98]) by hub.freebsd.org (Postfix) with ESMTP id 5CB4115121 for ; Mon, 13 Sep 1999 13:41:37 -0700 (PDT) (envelope-from proot@iaces.com) Received: (from proot@localhost) by iaces.com (8.9.3/8.9.3) id PAA06823; Mon, 13 Sep 1999 15:41:04 -0500 (CDT) From: "Paul T. Root" Message-Id: <199909132041.PAA06823@iaces.com> Subject: Re: SCSI drive mirroring question In-Reply-To: from Andriss at "Sep 13, 99 02:44:56 pm" To: andriss@andriss.com (Andriss) Date: Mon, 13 Sep 1999 15:41:04 -0500 (CDT) Cc: proot@iaces.com, questions@FreeBSD.ORG X-Organization: USWEST !nterprise Networking - ACES X-Phone: (612) 664-3385 X-Fax: (612) 664-4779 X-Page: (800) SKY-PAGE PIN: 537-7270 X-Address: 600 Stinson Blvd, Fl 1S X-Address: Minneapolis, MN 55413 X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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