From nobody@FreeBSD.org  Wed Nov 12 01:21:55 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CD940106567A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Nov 2008 01:21:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id C04A88FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Nov 2008 01:21:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mAC1LtYQ082840
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Nov 2008 01:21:55 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id mAC1LtSF082839;
	Wed, 12 Nov 2008 01:21:55 GMT
	(envelope-from nobody)
Message-Id: <200811120121.mAC1LtSF082839@www.freebsd.org>
Date: Wed, 12 Nov 2008 01:21:55 GMT
From: Winder <freebsdbugs.20.awinder@spamgourmet.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Gmirror handbook instructions convert boot-drive to gmirror, truncating last sector
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         128804
>Category:       docs
>Synopsis:       Gmirror handbook instructions convert boot-drive to gmirror, truncating last sector
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 12 01:30:01 UTC 2008
>Closed-Date:    Tue Dec 23 12:08:04 UTC 2008
>Last-Modified:  Tue Dec 23 12:10:01 UTC 2008
>Originator:     Winder
>Release:        7.1-PRERELEASE
>Organization:
>Environment:
FreeBSD DEV2 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #3: Fri Nov  7 19:54:41 MST 2008     windrider@DEV2:/usr/obj/usr/src/sys/packetcheckv1-fileserv  amd64
>Description:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html

This geom mirroring documentation shows a way to convert the boot drive into a gmirror raid. This guide misleads in assuming your whole drive has not been used.

The problem is that gmirror truncates the last sector of the drive for metadata; thus, any data stored in that sector when adding the drive into the RAID is lost. Sysinstall uses the entire drive by default. Following these instructions, then, could cause loss of data or a corrupt partition, as it will reach one sector beyond the end of the geom mirror device.

mightn't it be better to make an example from a blank disk?
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Tom Rhodes <trhodes@FreeBSD.org>
To: Winder <freebsdbugs.20.awinder@spamgourmet.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: docs/128804: Gmirror handbook instructions convert boot-drive
 to gmirror, truncating last sector
Date: Wed, 12 Nov 2008 02:18:59 -0500

 I would think that converting the disk device to a software
 RAID, at least the boot disk, would be the way most people
 wanted to use it.  And in most cases, I think that it's one
 of the first things done during an installation - though,
 YMMV.  If the last sector is filled with user data - there
 are larger problems, possibly, than just where GEOM places
 metadata.
 
 If you feel a warning is required here, I'll gladly add one,
 but it never crossed my mind initially that someone would
 actually be using the last sector on the drive for data.
 
 Thanks,
 
 -- 
 Tom Rhodes
Responsible-Changed-From-To: freebsd-doc->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Sun Dec 21 12:22:19 UTC 2008 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128804 
State-Changed-From-To: open->closed 
State-Changed-By: trhodes 
State-Changed-When: Tue Dec 23 12:07:46 UTC 2008 
State-Changed-Why:  
Warning has been added, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128804 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/128804: commit references a PR
Date: Tue, 23 Dec 2008 12:07:42 +0000 (UTC)

 trhodes     2008-12-23 12:07:29 UTC
 
   FreeBSD doc repository
 
   Modified files:
     en_US.ISO8859-1/books/handbook/geom chapter.sgml 
   Log:
   Add a warning about gmirror truncating the last sector, which may, in
   some cases, cause data loss.
   
   PR:             128804
   Reviewed by:    keramida, pgj, rene (as part of a larger change set)
   
   Revision  Changes    Path
   1.47      +7 -0      doc/en_US.ISO8859-1/books/handbook/geom/chapter.sgml
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
