From owner-freebsd-bugs@FreeBSD.ORG Fri Nov 7 07:50:20 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37AA016A4D0 for ; Fri, 7 Nov 2003 07:50:20 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2DBA43FEC for ; Fri, 7 Nov 2003 07:50:17 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hA7FoHFY091997 for ; Fri, 7 Nov 2003 07:50:17 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hA7FoHhT091996; Fri, 7 Nov 2003 07:50:17 -0800 (PST) (envelope-from gnats) Resent-Date: Fri, 7 Nov 2003 07:50:17 -0800 (PST) Resent-Message-Id: <200311071550.hA7FoHhT091996@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, freebsduser@paradisegreen.co.uk Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 930E416A4CE for ; Fri, 7 Nov 2003 07:41:51 -0800 (PST) Received: from mail.paradise-green.co.uk (161-86-19-212-hpnt-t3-z2.wireless.as15758.net [212.19.86.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC06343FEA for ; Fri, 7 Nov 2003 07:41:49 -0800 (PST) (envelope-from root@mail.paradise-green.co.uk) Received: from mail.paradise-green.co.uk (localhost.paradise [127.0.0.1]) hA7FflgI000781 for ; Fri, 7 Nov 2003 15:41:47 GMT (envelope-from root@mail.paradise-green.co.uk) Received: (from root@localhost)hA7FfkS2000780; Fri, 7 Nov 2003 15:41:46 GMT (envelope-from root) Message-Id: <200311071541.hA7FfkS2000780@mail.paradise-green.co.uk> Date: Fri, 7 Nov 2003 15:41:46 GMT From: freebsduser@paradisegreen.co.uk To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/59042: Vinum fails to initialise on hardware drive arrays. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Nov 2003 15:50:20 -0000 >Number: 59042 >Category: bin >Synopsis: Vinum fails to initialise on hardware drive arrays. >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Nov 07 07:50:17 PST 2003 >Closed-Date: >Last-Modified: >Originator: Thomas Sandford >Release: FreeBSD 4.9-RELEASE i386 >Organization: Paradise Green Technical Services >Environment: System: FreeBSD almaz.paradise 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Fri Nov 7 02:00:20 GMT 2003 root@almaz.paradise:/usr/src/sys/compile/ALMAZ i386 The machine has a Compaq Smart Arry 3200 controller fitted (idad driver) and vinum is used to subdivide the partitions on the resulting virtual drives. >Description: vinum start gives a syntax error and fails to load the previous configuration. This is a bug introduced in /usr/src/sbin/vinum/commands.c at version 1.31.2.6 The test introduced to detect md drives triggers on almost anything that is not a conventional ATAPI/SCSI drive. A better test is suggested in Fix: below. >How-To-Repeat: Attempt to use vinum on most hardware drive array controllers. >Fix: apply the following patch to /usr/src/sbin/vinum/commands.c (patch against 1.31.2.6) --- commands.c.orig Fri Nov 7 14:54:34 2003 +++ commands.c Fri Nov 7 15:09:01 2003 @@ -546,9 +546,9 @@ for (i = 0; i < devs; i++) { struct devstat *stat = &statinfo.dinfo->devices[i]; - if ((((stat->device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_DIRECT) /* disk device */ - || ((stat->device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_STORARRAY)) /* storage array */ - &&((stat->device_type & DEVSTAT_TYPE_IF_MASK) != DEVSTAT_TYPE_IF_OTHER) /* and not md */ + if (((((stat->device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_DIRECT) /* disk device */ + &&((stat->device_type & DEVSTAT_TYPE_IF_MASK) != DEVSTAT_TYPE_IF_OTHER)) /* and not md */ + ||((stat->device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_STORARRAY)) /* storage array */ &&((stat->device_type & DEVSTAT_TYPE_PASS) == 0) /* and not passthrough */ &&((stat->device_name[0] != '\0'))) { /* and it has a name */ sprintf(enamelist, "%s%s%d", _PATH_DEV, stat->device_name, stat->unit_number); >Release-Note: >Audit-Trail: >Unformatted: