Date: Tue, 21 Feb 2006 13:50:27 +0200 From: Ruslan Ermilov <ru@freebsd.org> To: Eivind Olsen <eivind@aminor.no> Cc: freebsd-stable@freebsd.org Subject: Re: gmirror is confusing me, will I be bitten by the last-sector-use? Message-ID: <20060221115027.GB60211@ip.net.ua> In-Reply-To: <43FAE446.4090807@aminor.no> References: <43FAE446.4090807@aminor.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--ZfOjI3PrQbgiZnxM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 21, 2006 at 10:58:30AM +0100, Eivind Olsen wrote: > Hello. >=20 > I've just configured a server to use gmirror (using FreeBSD 6.1b2). I=20 > followed the tutorial on=20 > http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html and did=20 > it install-time. > Then I read in the gmirror(8) man-page that gmirror uses the last sector= =20 > of the provider to store metadata. >=20 > My mirror consists of two IDE-disks/consumers (ad0 and ad3), both=20 > showing a mediasize of "250059350016 (233G)" in "gmirror list". The=20 > provider is shown as having a mediasize of 250059349504. Sectorsize =3D 5= 12. >=20 > Now, how can I check whether my current partitions will cause trouble=20 > with the metadata-sector or not? I've done some searching on the net,=20 > but I'm still a bit confused. If I understand correctly, the consumers=20 > ad0/ad2 span 488397168 sectors (mediasize/sectorsize), and the=20 > mirror/gm0 spans 488397167 sectors. >=20 In short: kernel (g_mirror) won't let you write to the last sector of its media. > Here's the output from bsdlabel: >=20 > vimes# bsdlabel /dev/mirror/gm0s1 > # /dev/mirror/gm0s1: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 6291456 0 4.2BSD 2048 16384 28552 > b: 4194304 6291456 swap > c: 488392002 0 unused 0 0 # "raw" part,=20 > don't edit > d: 41943040 10485760 4.2BSD 2048 16384 28552 > e: 2097152 52428800 4.2BSD 2048 16384 28552 > f: 31457280 54525952 4.2BSD 2048 16384 28552 > g: 31457280 85983232 4.2BSD 2048 16384 28552 > h: 370951490 117440512 4.2BSD 2048 16384 28552 >=20 > So, the "h" partition, which is the last one, has offset=3D117440512 and= =20 > size=3D370951490, and if I add those together I get 488392002. Does this= =20 > mean that my "h" partition ends at 488392001 (right before 488392002),=20 > and I'm still several sectors away from the metadata? Or am I=20 > misunderstanding things here? >=20 Your "c" partition (the whole disk) occupies 488392002 sectors. The "h"'s partition last sector is 117440512+370951490-1=3D488392001. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --ZfOjI3PrQbgiZnxM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD+v6DqRfpzJluFF4RAnLeAJ9ustWschedFxAwMWChBcHdgsTX0gCfYCf9 mekJbfHSL3mdjA92i/poFd4= =XbYc -----END PGP SIGNATURE----- --ZfOjI3PrQbgiZnxM--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060221115027.GB60211>