From owner-freebsd-questions@FreeBSD.ORG Sun Feb 27 16:26:39 2005 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 206F016A4CE for ; Sun, 27 Feb 2005 16:26:39 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 09CD443D48 for ; Sun, 27 Feb 2005 16:26:38 +0000 (GMT) (envelope-from emanuel.strobl@gmx.net) Received: (qmail invoked by alias); 27 Feb 2005 16:26:36 -0000 Received: from flb.schmalzbauer.de (EHLO cale.flintsbach.schmalzbauer.de) (62.245.232.135) by mail.gmx.net (mp028) with SMTP; 27 Feb 2005 17:26:36 +0100 X-Authenticated: #301138 From: Emanuel Strobl To: freebsd-questions@freebsd.org Date: Sun, 27 Feb 2005 17:27:03 +0100 User-Agent: KMail/1.7.2 References: <1109472847.4221364fdc017@my1.dal.ca> In-Reply-To: <1109472847.4221364fdc017@my1.dal.ca> X-Birthday: 10/06/72 X-CelPhone: +49 173 9967781 X-Tel: +49 89 18947781 X-Country: Germany X-Address: Munich, 80686 X-OS: FreeBSD MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart65271141.olV4qlWMVe"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200502271727.08076@harrymail> X-Y-GMX-Trusted: 0 cc: Stephen Kelly Subject: Re: gmirror disk mirroring 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: Sun, 27 Feb 2005 16:26:39 -0000 --nextPart65271141.olV4qlWMVe Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Am Sonntag, 27. Februar 2005 03:54 schrieb Stephen Kelly: > Hi All, > > I'm having a problem trying to set up disk mirroring of two 80G Western > Digital IDE drives. I'm using the instructions at > http://people.freebsd.org/~rse/mirror/ > I've included these instructions at the end of this e-mail. > When I reboot the system for the first time as instructed, it starts to > boot but then just starts printing the following messages to the screen: > > init: can't exec getty `usr/libexec/getty` for port ttyv1: > No such file or directory > init: can't exec getty `usr/libexec/getty` for port ttyv2: > No such file or directory > init: can't exec getty `usr/libexec/getty` for port ttyv3: > No such file or directory > init: can't exec getty `usr/libexec/getty` for port ttyv4: > No such file or directory > . > . > . Something at the dump/restore stage went wrong or your /etc/fstab is wrong. Delete /boot.congig an boot from the initial disk, btw. is your second driv= e=20 really on primary slave? That's why I hate how-tos, people just type it wor= d=20 by word without knowing what they do. If your disk ist secondary master, it's not ad1 but ad2, in GENERIC ata is= =20 compiled with ATA_STATIC_ID. =46orget the howto and read the man pages, it's the shorter way if the howt= o=20 doesn't work for you. Best regards, =2DHarry > > > Can anyone tell me where I'm going wrong/what is happening? > Thanks so much, > Stephen > > The instructions: > # make sure the second disk is treated as a really fresh one > # (not really necessary, but makes procedure more deterministically ;-) > dd if=3D/dev/zero of=3D/dev/ad1 bs=3D512 count=3D79 > > # place a GEOM mirror label onto second disk > # (actually on the last block of the disk) > gmirror label -v -n -b round-robin gm0 /dev/ad1 > > # activate GEOM mirror kernel layer > # (makes the /dev/mirror/gm0 device available) > gmirror load > > # place a PC MBR onto the second disk > # (with a single FreeBSD slice /dev/mirror/gm0s1 covering the whole disk) > fdisk -v -B -I /dev/mirror/gm0 > > # place a BSD disklabel onto /dev/mirror/gm0s1 > # (ATTENTION: in FreeBSD 5-STABLE before 14-Jan-2005 the > # /dev/mirror/gm0s1 device has to be specified as just "mirror/gm0s1" or > # the bsdlabel(8) will use the incorrect GEOM name "gm0s1" instead!) > # (NOTICE: figure out what partitions you want with "bsdlabel /dev/ad0" > before) # (NOTICE: start "a" partition at offset 16, "c" partition at > offset 0) bsdlabel -w -B /dev/mirror/gm0s1 # initialize > bsdlabel -e /dev/mirror/gm0s1 # create custom partitions > > # manually copy filesystem data from first to to second disk > # (same procedure for partitions "g", etc) > newfs -U /dev/mirror/gm0s1a > mount /dev/mirror/gm0s1a /mnt > dump -L -0 -f- / | (cd /mnt; restore -r -v -f-) > newfs -U /dev/mirror/gm0s1d > mount /dev/mirror/gm0s1d /mnt/var > dump -L -0 -f- /var | (cd /mnt/var; restore -r -v -f-) > newfs -U /dev/mirror/gm0s1e > mount /dev/mirror/gm0s1e /mnt/usr > dump -L -0 -f- /usr | (cd /mnt/usr; restore -r -v -f-) > > # adjust new system configuration for GEOM mirror based setup > cp -p /mnt/etc/fstab /mnt/etc/fstab.orig > sed -e 's/dev\/ad0/dev\/mirror\/gm0/g' /mnt/etc/fst= ab > echo 'swapoff=3D"YES"' >>/mnt/etc/rc.conf # for 5.3-RELEASE only > echo 'geom_mirror_load=3D"YES"' >>/mnt/boot/loader.conf > > # instruct boot stage 2 loader on first disk to boot > # with the boot stage 3 loader from the second disk > # (mainly because BIOS might not allow easy booting from second ATA disk > # or at least requires manual intervention on the console) > echo "1:ad(1,a)/boot/loader" >/boot.config > > # reboot system > # (for running system with GEOM mirror on second disk) > shutdown -r now > > # make sure the first disk is treated as a really fresh one > # (also not really necessary, but makes procedure more deterministically > ;-) dd if=3D/dev/zero of=3D/dev/ad0 bs=3D512 count=3D79 > > # switch GEOM mirror to auto-synchronization and add first disk > # (first disk is now immediately synchronized with the second disk conten= t) > gmirror configure -a gm0 > gmirror insert gm0 /dev/ad0 > > # wait for the GEOM mirror synchronization to complete > sh -c 'while [ ".`gmirror list | grep SYNCHRONIZING`" !=3D . ]; do sleep = 1; > done' > > # reboot into the final two-disk GEOM mirror setup > # (now actually boots with the MBR and boot stages on first disk > # as it was synchronized from second disk) > shutdown -r now > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" --nextPart65271141.olV4qlWMVe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCIfTcBylq0S4AzzwRAugKAJ9+ktWCbx9Nbo7+h8TjjVdaBUiHuQCeLRhj Rj+nRAviHLS8AOzB0wY8X9c= =B2Hy -----END PGP SIGNATURE----- --nextPart65271141.olV4qlWMVe--