From owner-freebsd-questions Wed Oct 30 11:10:57 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 886E837B401 for ; Wed, 30 Oct 2002 11:10:55 -0800 (PST) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C744743E75 for ; Wed, 30 Oct 2002 11:10:54 -0800 (PST) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.6+Sun/8.11.6) id g9UJAJx27171; Wed, 30 Oct 2002 14:10:19 -0500 (EST) From: Jerry McAllister Message-Id: <200210301910.g9UJAJx27171@clunix.cl.msu.edu> Subject: Re: SCSI -RAID 5 again To: grant@thenetnow.com Date: Wed, 30 Oct 2002 14:10:18 -0500 (EST) Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: <00bc01c28039$ebab2bb0$6401a8c0@grant> from "Grant Peel" at Oct 30, 2002 12:29:32 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > Sorry all, the previous mail was sent prematurely... > > Hi all, > > ... > > In effect, I want to create a mirror, will this work, and would the command > lines (in cron) look like: > > dump -0u -h0 -f /dev/ad0s1 / > dump -0u -h0 -f /dev/ad0s1/var /var > dump -0u -h0 -f /dev/ad0s1/usr /usr > dump -0u -h0 -f /dev/ad0s1/home /home These dumps wil make files not file systems, so you probably want to name a file, not a partition or directory for where to write them. Then you will have to do a restore(8) on that file to get it on the other partition in a usable manner. You could pipe the output of dump to the input of restore and put it there that way. But, for anything big, that makes me nervous. I prefer making a file and separating the steps. I don't think the -h0 makes sense for a full dump, but maybe. You will want to also use the 'a' flag on the dump, so example, dump root to some scratch space. Then restore it to your /dev/ados1a which you have mounted as '/altroot' dump 0uaf /scratch/root.dump / cd /altroot restore -rf /scratch/root.dump Continue for the other partitions/filesystems. Alternatively you could try cd /altroot dump 0uaf - / | restore -rf - Restore can be weird about overwriting files of the same path/name so I would make sure the partition was empty before doing this. > > An the last question is, if I want to make the second drive bootable (in the > event the raid system dies), do I need to load (from scratch) the OS > (FreeBSD 4.4) on the new drive first, or, just partition and disklabel it > creating the needed filesystems? If you have done something like the above examples on a properly fdisked, disklabeled and newfsed disk, then you can just plug that disk in the right place and boot. I have don't it lots of times. If you are doing this after a disk dies and you have enough of a system running so you can get to your media where the backup is kept and can run a restore, you don't need to load a complete system. You will need to have a disk fdisked and with a Master Boot sector and partitioned as you want and with boot1 and boot2. Then newfs(8) the partition[s]. Then all you have to do is the restores and move the disk to the correct slot (or tinker boot sequence in BIOS) and boot up the replacement disk. You might also have to tinker with /etc/fstab in single user mode if the new variation has different partitions or mount points, etc. Anyway, those dumps contain the whole OS that you need - not counting the slicing, partitioning and boot sectors and newfs-ing - to run. ////jerry > > TIA, > > -Grant > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message