Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Nov 2004 21:27:59 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Jo?o Carlos Mendes =?iso-8859-2?Q?Lu=EDs?= <jonny@jonny.eng.br>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)
Message-ID:  <20041128202759.GF7232@darkness.comp.waw.pl>
In-Reply-To: <41A78A47.3050309@jonny.eng.br>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041128202759.GF7232>