Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Sep 2005 11:02:12 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Victor Sudakov <sudakov@sibptus.tomsk.ru>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Create a mirror on disk with valid data
Message-ID:  <20050929090212.GA1715@garage.freebsd.pl>
In-Reply-To: <20050916073012.GA31056@admin.sibptus.tomsk.ru>
References:  <20050916073012.GA31056@admin.sibptus.tomsk.ru>

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

--n8g4imXOkfNTN/H1
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 16, 2005 at 02:30:12PM +0700, Victor Sudakov wrote:
+> Colleagues,
+>=20
+> gmirror(8) says that a mirror can be created from a disk with existing
+> data. However, other sources like=20
+> http://ezine.daemonnews.org/200502/diskmirror.html=20
+> say that the mirror device should be first partitioned, labelled and
+> formatted.
+>=20
+> The second way seems to me more feasible. From experimenting with
+> different disks I have found out that (according to fdisk) the size of g=
m0
+> is several sectors smaller than that of ad0. I said to myself, that is
+> the overhead of the gmirror metadata.
+>=20
+> How could it then be possible to create a mirror from a disk with
+> existing data, like the man page suggests?  The gmirror metadata could
+> then be overwritten with user data or vice versa.
+>=20
+> Any input is very much appreciated.=20

You are right. Last sector is used for metadata and will be overwritten.
The example is there actually to show that you can create a mirror with
only one disk and add another one later.
I added a note to clarify that.
In real world it is really hard to trigger, because both fdisk(8) and
bsdlabel(8) like to cut much more than one sector at the end of the
disk/slice, so in most cases it is safe, but I always recommended to
dump -> [ fdisk -> bsdlabel -> ] gmirror label -> [ fdisk -> bsdlabel -> ] =
restore.

Thanks.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--n8g4imXOkfNTN/H1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQFDO62UForvXbEpPzQRAo7GAKDw1WXBYYJCiRm4cmbLu7E0ekHusQCg5rDl
ArBzJzc7qNuevPq/03D6HEw=
=U2fy
-----END PGP SIGNATURE-----

--n8g4imXOkfNTN/H1--



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