Date: Mon, 28 Oct 2002 16:16:09 -0800 (PST) From: Mikel Lechner <mikel@svpal.org> To: freebsd-gnats-submit@FreeBSD.org Subject: i386/44581: ar RAID driver crashes using older DISKS Message-ID: <200210290016.g9T0G9MA007600@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 44581 >Category: i386 >Synopsis: ar RAID driver crashes using older DISKS >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 28 16:20:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Mikel Lechner >Release: RELENG_4_7 on Intel i386 (local build) >Organization: Silicon Valley Public Access Link >Environment: FreeBSD enterprise.svpal.org 4.7-RELEASE FreeBSD 4.7-RELEASE #6: Tue Oct 15 00:05:58 PDT 2002 mikel@enterprise.thelechners.org:/usr/src/sys/compile/ENTERPRISE i386 >Description: Defining a RAID1 using older drives (eg. without LBA support) crashes the system. The problem is that the code in ata-raid.c overwrites flags in the ad driver to indicate that the drive is part of a RAID. Other flags set previously by the ad driver code (eg. AD_F_CHS_USED) are cleared by this operation. This causes a catastrophic error when the drive is later accessed to write data, resulting is a system crash and corrupted disk drives. >How-To-Repeat: Install a non-LBA disk drive, configure a RAID1 using the atacontrol command. Then create a filesystem on the RAID device ar0. Then delete the RAID configuration with the atacontrol commmand. Try to reboot. The system sometimes crashes or has problems on reboot due to corrupted boot disk. >Fix: In the function ata_raiddisk_attach, instead of overwriting the ad driver flags, OR in the AD_F_RAID_SUBDISK flag. The function ata_raiddisk_detach correctly AND out the AD_F_RAID_SUBDISK flag. Here's the diff... RCS file: /usr/ncvs/src/sys/dev/ata/ata-raid.c,v retrieving revision 1.3.2.18 diff -r1.3.2.18 ata-raid.c 104c104 < AD_SOFTC(rdp->disks[disk])->flags = AD_F_RAID_SUBDISK; --- > AD_SOFTC(rdp->disks[disk])->flags |= AD_F_RAID_SUBDISK; 343c343 < AD_SOFTC(rdp->disks[disk])->flags = AD_F_RAID_SUBDISK; --- > AD_SOFTC(rdp->disks[disk])->flags |= AD_F_RAID_SUBDISK; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210290016.g9T0G9MA007600>