Date: Tue, 17 Jan 2006 13:09:08 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Brent Hostetler <brenthostetler@gmail.com> Cc: freebsd-geom@freebsd.org Subject: Re: Metadata info. Message-ID: <20060117120908.GB20602@garage.freebsd.pl> In-Reply-To: <aadbc3580601141319m79e59c1en67e2d1de119fadba@mail.gmail.com> References: <aadbc3580601141319m79e59c1en67e2d1de119fadba@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 14, 2006 at 01:19:02PM -0800, Brent Hostetler wrote: +> Hello, +>=20 +> I am trying to understand how metadata works properly within the +> geom framework. I have been having varying problems which I +> believe are metadata related. +>=20 +> I assume from the following quote from gmirro man page +> that metadata is stored on the last sector of the provider -- +> ie /dev/ad4, /dev/ad4s1, /dev/stripe1, or /dev/stripe1a -- and not +> necessarily the last sector of the disk. +>=20 +> <quote> The gmirror utility uses on-disk metadata (stored in +> the provider's last sector) to store all needed information. +> Since the last sector is used for this purpose,it is possible +> to place a root file system on a mirror.</quote> +>=20 +> Because of this I notice that when setting up a mirror of a +> slice you will get error from bsdlabel /dev/ad4 saying +> bsdlabel: partition c doesn't cover the whole unit!... If you +> bsdlabel the actual /dev/mirror/data1 it will not issue the +> warning. The is correct behavior right? +>=20 +> So if you are mirroring /dev/ad4 then you would make sure that +> the last slice that is created is one sector smaller then the media +> size in sectors such as example 1. +>=20 +> Example 1: +>=20 +> gmirror label -v -n -b round-robin data1 /dev/ad4 +>=20 +> [------ ad4 ------] +> [-----ad4s1------]* +> [ad4s1a][-ad4s1d-]* +>=20 +> or +>=20 +> [----------ad4------------] +> [-----ad4s1----][--ad4s2-]* +> [ad4s1a][ad4s1b][-ad4s2a-]* That's correct. +> If you are operating on slices then you would make sure the last +> partition in the mirrored slice would be one sector smaller then +> the slice size in sectors such as example 2 and 3. +>=20 +> Example 2: +>=20 +> gmirror label -v -n -b round-robin data1 /dev/ad4s1 +>=20 +> [----------- ad4 --------------] +> [----ad4s1-----]*[---ad4s2-----] +> [ad4s1d][ad4s1e]*[---ad4s2a----] +>=20 +>=20 +> Example 3: +>=20 +> gmirror label -v -n -b round-robin data1 /dev/ad4s1 +> gmirror label -v -n -b round-robin data2 /dev/ad4s2 +>=20 +> [----------- ad4 --------------] +> [----ad4s1-----]*[---ad4s2----]* +> [ad4s1d][ad4s1e]*[---ad4s2a---]* No, example 2: [----------- ad4 --------------] [----ad4s1------][---ad4s2-----] [ad4s1d][ad4s1e]*[---ad4s2a----] Example 3: [----------- ad4 --------------] [----ad4s1------][---ad4s2-----] [ad4s1d][ad4s1e]*[---ad4s2a---]* +> If operating on geom's class providers it works the same way +> correct? +>=20 +> Example 4: +>=20 +> gmirror label -v -n -b round-robin data1 /dev/stripe/stripe1 +>=20 +> [------------stripe1-----------] +> [------stripe1s1--------------]* +> [------stripe1s1a-------------]* That's correct. But the more correct pictures are: Disk mirroring: [------------ ad4 ------------] [-------- mirror/foo --------]* [------- mirror/foos1 -------]* [mirror/foos1s][mirror/foos1d]* Slice mirroring: [------------ ad4 ------------] [---- ad4s1 ----][--- ad4s2 --] [- mirror/foo -]*[-- ad4s2a --] [ mirror/fooa -]* Partition mirroring: [------------ ad4 ------------] [---- ad4s1 ----][--- ad4s2 --] [---- ad4s1a ---][-- ad4s2a --] [- mirror/foo -]* Stripe mirroring: [--- stripe/foo ---] [--- mirror/bar --]* [-- mirror/bars1 -]* [- mirror/bars1a -]* Remember that you can setup slices/partitions on mirror device, you don't have to do it on plain disk. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --7iMSBzlTiPOCCT2k Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDzN5kForvXbEpPzQRAgveAJ9jtDs7T59T6fYF89rJHMwuGxDb/ACdFcF/ 1YJcoKQDTc/lEpQ63mvGlbg= =/fFe -----END PGP SIGNATURE----- --7iMSBzlTiPOCCT2k--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060117120908.GB20602>