From owner-freebsd-questions@FreeBSD.ORG Tue Aug 3 06:43:27 2004 Return-Path: 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 9335816A4CE for ; Tue, 3 Aug 2004 06:43:27 +0000 (GMT) Received: from gwdu60.gwdg.de (gwdu60.gwdg.de [134.76.8.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A43C43D49 for ; Tue, 3 Aug 2004 06:43:26 +0000 (GMT) (envelope-from kheuer2@gwdg.de) Received: from gwdu60.gwdg.de (localhost [127.0.0.1]) by gwdu60.gwdg.de (8.12.11/8.12.8) with ESMTP id i736hPNf082395; Tue, 3 Aug 2004 08:43:25 +0200 (CEST) (envelope-from kheuer2@gwdg.de) Received: from localhost (kheuer2@localhost)i736hO5M082392; Tue, 3 Aug 2004 08:43:24 +0200 (CEST) X-Authentication-Warning: gwdu60.gwdg.de: kheuer2 owned process doing -bs Date: Tue, 3 Aug 2004 08:43:24 +0200 (CEST) From: Konrad Heuer To: Matt In-Reply-To: <1e490997040802231017bc78bf@mail.gmail.com> Message-ID: <20040803083942.C82126@gwdu60.gwdg.de> References: <1e490997040802231017bc78bf@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: questions@freebsd.org Subject: Re: using a disk "mirrored" with dd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2004 06:43:27 -0000 On Tue, 3 Aug 2004, Matt wrote: > I have a machine running 4.10-RELEASE-p2 with two identical hard disks > -- ad0 and ad2. I would like to make a complete copy of the first disk > to the second disk nightly for quick disaster recovery. > > I've dd'ed the disk as follows > > # dd if=/dev/ad0 of=/dev/ad2 > > and edited the disklabel of the second disk to change ad0s1 to ad2s1 as follows > > # disklabel -e -r ad2 > > However, I'm still unable to mount the root partion (or any other > partition) of the second disk to tweak /etc/fstab etc. even though > > # mount /dev/ad2s1a /mnt > mount: /dev/ad2s1a: Operation not permitted > > What am I missing? Is there anything else I need to do beyond editing > the disklabel to allow me to use the "mirrored" disk? > > Output of disklabel for the two disks follows: > > # disklabel ad0 > # /dev/ad0c: > type: ESDI > disk: ad0s1 > label: > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 255 > sectors/cylinder: 16065 > cylinders: 4864 > sectors/unit: 78156162 > rpm: 3600 > interleave: 1 > trackskew: 0 > cylinderskew: 0 > headswitch: 0 # milliseconds > track-to-track seek: 0 # milliseconds > drivedata: 0 > > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 409600 0 4.2BSD 2048 16384 97 # (Cyl. 0 - 25*) > b: 5242880 409600 swap # (Cyl. 25*- 351*) > c: 78156162 0 unused 0 0 # (Cyl. 0 - 4864*) > e: 4194304 5652480 4.2BSD 2048 16384 89 # (Cyl. 351*- 612*) > f: 10485760 9846784 4.2BSD 2048 16384 89 # (Cyl. 612*- 1265*) > g: 18874368 20332544 4.2BSD 2048 16384 89 # (Cyl. 1265*- 2440*) > > # disklabel ad2 > # /dev/ad2c: > type: ESDI > disk: ad2s1 > label: > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 255 > sectors/cylinder: 16065 > cylinders: 4864 > sectors/unit: 78156162 > rpm: 3600 > interleave: 1 > trackskew: 0 > cylinderskew: 0 > headswitch: 0 # milliseconds > track-to-track seek: 0 # milliseconds > drivedata: 0 > > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 409600 0 4.2BSD 2048 16384 97 # (Cyl. 0 - 25*) > b: 5242880 409600 swap # (Cyl. 25*- 351*) > c: 78156162 0 unused 0 0 # (Cyl. 0 - 4864*) > e: 4194304 5652480 4.2BSD 2048 16384 89 # (Cyl. 351*- 612*) > f: 10485760 9846784 4.2BSD 2048 16384 89 # (Cyl. 612*- 1265*) > g: 18874368 20332544 4.2BSD 2048 16384 89 # (Cyl. 1265*- 2440*) > > Thanks for any insight, and let me know if you need to see anything else. Did you do the dd-copy while the system was running multi-user from the first disk? I'd expect larger problems then because the file systems inconsistencies on the second disk may never be resolved. If you did it in single user mode, a 'fsck -y' for each file system on the second disk before trying to mount may help. Best regards Konrad Heuer GWDG, Am Fassberg, 37077 Goettingen, Germany, kheuer2@gwdg.de