misc/166589: atacontrol incorrectly treats RAID10 and 0+1 the same

Allen landsidel.allen at gmail.com
Mon Apr 2 19:20:03 UTC 2012

>Number:         166589
>Category:       misc
>Synopsis:       atacontrol incorrectly treats RAID10 and 0+1 the same
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 02 19:20:02 UTC 2012
>Originator:     Allen
>Release:        8.2
FreeBSD is01 8.2-STABLE FreeBSD 8.2-STABLE #0: Thu Sep 15 15:30:52 EDT 2011     root@:/usr/obj/usr/src/sys/GENERIC  amd64
Reference: http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/atacontrol/atacontrol.c?annotate=

atacontrol.c commit on 25-Jan-2006, lines 413-427.

Code was added to allow creation of RAID0+1 on ATA controllers available at the time.  This code is checking for the user supplied strings "RAID0+1" and "RAID10" and treating them both the same.

As a result, RAID10 arrays cannot be created on devices that support both levels -- unknown if there are any such devices supported by atacontrol.

RAID10 and RAID0+1 are not the same thing.  The comment in the commit implies that the author thinks they are.

1. On controllers only supporting one of the two levels (0+1 or 10), display and expect the correct string.

2. Separate the two so that, if there are any controllers that do support both, the correct one can be chosen.

ata_ioc_raid_config in sys/sys/ata.h will also need modified to support both AR_RAID01 and AR_RAID10.


More information about the freebsd-bugs mailing list