Date: Thu, 7 Dec 2006 12:53:33 +1030 (CST) From: Benjamin Close <Benjamin.Close@clearchain.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/106431: Inform user of ata RAID5 acting as RAID0 Message-ID: <200612070223.kB72NXdC023331@pegasus.clearchain.com> Resent-Message-ID: <200612070230.kB72U73T078820@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 106431 >Category: kern >Synopsis: Inform user of ata RAID5 acting as RAID0 >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Dec 07 02:30:07 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Benjamin Close >Release: FreeBSD 6.1-->Current 7/12/2006 >Organization: >Environment: Any machine with ata/sata controllers >Description: At present the ata driver does not generate or use parity when dealing with RAID5 ata/sata arrays. Whist this is documented in ataraid(4) unless the user reads the man page they would be unaware their RAID5 is actually a RAID0. This critical difference should be highlighed to the user at boot time and when checking the raid status, so they can be made aware of the problem. Losing a RAID set when you thought it was secure would be extremely bad. Also the driver has the potential to corrupt an already populated RAID5 as new data added will not have parity. >How-To-Repeat: Boot any FreeBSD kernel on a machine with an ata/sata controller configured with a RAID5 array. >Fix: The below patch provides a boot time and status check time warning of the data safety risk that exists. diff -ur src/sbin/atacontrol/atacontrol.c new-src/sbin/atacontrol/atacontrol.c --- src/sbin/atacontrol/atacontrol.c Thu Dec 7 11:06:41 2006 +++ new-src/sbin/atacontrol/atacontrol.c Thu Dec 7 12:21:41 2006 @@ -581,6 +581,9 @@ default: printf("BROKEN\n"); } + if ( config.type == AR_RAID5 ) + printf("WARNING: RAID5 parity not yet supported, continuing as RAID0 see ataraid(4)\n"); + exit(EX_OK); } usage(); diff -ur src/sys/dev/ata/ata-raid.c new-src/sys/dev/ata/ata-raid.c --- src/sys/dev/ata/ata-raid.c Wed Nov 1 07:49:25 2006 +++ new-src/sys/dev/ata/ata-raid.c Thu Dec 7 12:22:28 2006 @@ -168,6 +168,9 @@ ata_raid_format(rdp), ata_raid_type(rdp), buffer, ata_raid_flags(rdp)); + if(rdp->type == AR_T_RAID5) + printf("ar%d: WARNING: RAID5 parity not yet supported, continuing as RAID0 see ataraid(4)\n",rdp->lun); + if (testing || bootverbose) printf("ar%d: %ju sectors [%dC/%dH/%dS] <%s> subdisks defined as:\n", rdp->lun, rdp->total_sectors, >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612070223.kB72NXdC023331>