From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 28 20:28:02 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9305C16A4CE for ; Sun, 28 Nov 2004 20:28:02 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id C21B743D5D for ; Sun, 28 Nov 2004 20:28:01 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 5CCBEACC26; Sun, 28 Nov 2004 21:27:59 +0100 (CET) Date: Sun, 28 Nov 2004 21:27:59 +0100 From: Pawel Jakub Dawidek To: Jo?o Carlos Mendes =?iso-8859-2?Q?Lu=EDs?= Message-ID: <20041128202759.GF7232@darkness.comp.waw.pl> References: <41A4FD60.4050501@jonny.eng.br> <20041125224547.GB7232@darkness.comp.waw.pl> <41A6B76F.4020101@jonny.eng.br> <20041126082340.GC7232@darkness.comp.waw.pl> <41A78A47.3050309@jonny.eng.br> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KJKxYQkVikLexIKR" Content-Disposition: inline In-Reply-To: <41A78A47.3050309@jonny.eng.br> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-hackers@freebsd.org Subject: Re: Hand on gmirror (Was: Re: gmirror bugs, how many?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 20:28:02 -0000 --KJKxYQkVikLexIKR Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 26, 2004 at 05:55:51PM -0200, Jo?o Carlos Mendes Lu=EDs wrote: +> Pawel Jakub Dawidek wrote: [...] +> >What error do you get when you try to do this? +>=20 +> Step by step: +>=20 +> - The system has started with a preloaded geom_mirror: [...] +> - There is a running mirror partition: [...] +> - Now let's try to remove (disable was my intention, a bad idea): +>=20 +> sigesc::root jcmendes [524] gmirror unload +> Could not unload module: Device not configured. +> sigesc::root jcmendes [525] gmirror list +> sigesc::root jcmendes [526] gmirror load +> Command 'load' not available. +> sigesc::root jcmendes [527] gmirror list +> sigesc::root jcmendes [528] kldstat +> Id Refs Address Size Name +> 1 13 0xc0400000 3126c4 kernel +> 2 1 0xc0713000 10be8 geom_mirror.ko +> 3 14 0xc0724000 59340 acpi.ko +> 4 1 0xc106a000 6000 linprocfs.ko +> 5 1 0xc1070000 18000 linux.ko +> 6 1 0xc1183000 2000 fade_saver.ko +> sigesc::root jcmendes [529] ls -l /dev/mirror/ +> total 1 +> dr-xr-xr-x 2 root wheel 512 Nov 26 12:19 . +> dr-xr-xr-x 5 root wheel 512 Nov 26 12:19 .. +> sigesc::root jcmendes [530] +>=20 +> - Well, something not good happened. The device did not unload, and do= =20 +> not list any device anymore. Trying to "reload" it has no effect. +> - This used to work before preloading it in loader.conf, but then I=20 +> would not be able to boot a mirror partition. [...] Not working 'unload' command is because of bug in GEOM. Now, to avoid deadlock you get an error (ENXIO), but mirror will be destroyed. The next 'unload' should be ok. To avoid those errors, you should first stop all mirrors (unsing 'stop' command) and then unload kernel module. BTW. There is no 'reload' command. +> Indeed, the -h option is what I wanted and the "bug" is in the=20 +> manual. What would happen if I change the disc ID in this case? Your disk will not be detected as a mirror component, because hardcoded name is different. +> sigesc::root jcmendes [553] disklabel mirror/vol0 +> # /dev/mirror/vol0: +> 8 partitions: +> # size offset fstype [fsize bsize bps/cpg] +> a: 16498864 16 unused 0 0 +> c: 16498880 0 unused 0 0 # "raw" part,=20 +> don't edit +> sigesc::root jcmendes [554] +>=20 +> Seems good until now. Except for the offset 16 of the "a" partition.= =20 +> Is this necessary? The man page says that the only sector reserved=20 +> for metadata is the provider's last one. Ehh, "blame" disklabel(8). First 16 sectors are reserved for boot code. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --KJKxYQkVikLexIKR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBqjTPForvXbEpPzQRAr5JAJ9pHvpI75YI1OK0NYu+IGySx3v28gCgjwNe i3nJiHq74LaKLPpY90n0hbs= =J0Ki -----END PGP SIGNATURE----- --KJKxYQkVikLexIKR--