From nobody@FreeBSD.org  Thu Jan 21 14:57:52 2010
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 9DB3C1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 21 Jan 2010 14:57:52 +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 8E1F18FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 21 Jan 2010 14:57:52 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LEvpk8058587
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 21 Jan 2010 14:57:52 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o0LEvpjg058586;
	Thu, 21 Jan 2010 14:57:51 GMT
	(envelope-from nobody)
Message-Id: <201001211457.o0LEvpjg058586@www.freebsd.org>
Date: Thu, 21 Jan 2010 14:57:51 GMT
From: Oles Hnatkevych <don_oles@able.com.ua>
To: freebsd-gnats-submit@FreeBSD.org
Subject: atacontrol can not create raid1 (mirror) from one drive
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         143056
>Category:       kern
>Synopsis:       [ata] atacontrol(8) can not create raid1 (mirror) from one drive
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 21 15:00:18 UTC 2010
>Closed-Date:    Sun Jan 24 11:00:58 UTC 2010
>Last-Modified:  Sun Jan 24 11:50:03 UTC 2010
>Originator:     Oles Hnatkevych
>Release:        FreeBSD 6.4
>Organization:
>Environment:
>Description:
atacontrol create raid1 ad4
This command fails with the message
atacontrol: At least 2 disks must be specified
This is bizarre since there MUST be a possibility to create 'degraded'
mirrors for the purpose of attaching a second drive after the one-drive-
mirror is created, as part of provisioning. 

If the check is commented in atacontrol.c then it fails with the ioctl
error, so the limitation is in the kernel driver.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Sun Jan 24 11:00:57 UTC 2010 
State-Changed-Why:  
The process that two disks are needed for RAID is documented and 
intended behaviour. Your question is unsupported at this moment. 

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

From: Oles Hnatkevych <don_oles@able.com.ua>
To: bug-followup@FreeBSD.org, don_oles@able.com.ua
Cc:  
Subject: Re: kern/143056: [ata] atacontrol(8) can not create raid1 (mirror)
 from one drive
Date: Sun, 24 Jan 2010 13:49:13 +0200

 Hello!
 
 How I can persuade people that there's no anything in any religion 
 against creating degraded mirrors from one hard drive, since it is
 
 1) technically possible
 2) it is very helpful
 
 Let's change the documentation and fix the religious problem.
 
 Example 1:
 
 The 300GB mirror is broken on a production system. But the space is 
 scarce, the decision is to migrate to 500 GB mirror. Two 500G disks are 
 bought.
 
 Intended (unsupported) way:
 The 500GB disk is inserted, from it created a one-disk mirror, mirror is 
 sliced and configured to boot, with rsync the whole system is migrated 
 from one degraded mirror to another, then again in single-user mode, 
 server turned off , 300 Gb disk taken out, both 500 Gb disks inserted, 
 server booted from a degraded 500G mirror, second disk added to mirror.
 
 The way I had to go:
 The same but I had to find a separate box in which I inserted both 500G 
 drives, boot from freebsd dvd in fixit mode, create full mirror, take 
 one hard drive, boot again and remove degraded mirror from second hard 
 drive (to add it later, not to confuse the production server).
 
 Example 2:
 I want to have a mirror but right now only one hard drive is available, 
 but I know that in month or two I'll have money to buy another one. It's 
 much more convenient to setup system on one-drive-mirror and then add 
 another one than to mess around with migration from single-drive without 
 mirror to a full mirror. Much more.
 
 Gmirror already supports one-drive mirrors. Yes, its author is more 
 open-minded.
 
 
 -- 
 ----------
 Oles Hnatkevych
 Skype: don_oles
 Email/Jabber: don_oles@able.com.ua
 http://gnut.able.com.ua/
>Unformatted:
