From owner-freebsd-bugs Thu Apr 25 8:10:24 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 73F1137B41A for ; Thu, 25 Apr 2002 08:10:06 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3PFA6789736; Thu, 25 Apr 2002 08:10:06 -0700 (PDT) (envelope-from gnats) Received: from alogis.com (firewall.solit-ag.de [212.184.102.1]) by hub.freebsd.org (Postfix) with ESMTP id 3731E37B428 for ; Thu, 25 Apr 2002 08:03:02 -0700 (PDT) Received: from alogis.com (kipp@clausthal.int1.b.intern [10.1.1.30]) by alogis.com (8.11.1/8.9.3) with ESMTP id g3PF30l06837 for ; Thu, 25 Apr 2002 17:03:00 +0200 (CEST) (envelope-from holger.kipp@alogis.com) Message-Id: <3CC81730.5260F586@alogis.com> Date: Thu, 25 Apr 2002 16:48:16 +0200 From: Holger Kipp Reply-To: holger.kipp@alogis.com To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/37458: twed (3ware escalade) devices not supported by vinum Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37458 >Category: bin >Synopsis: twed (3ware escalade) devices not supported by vinum >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 25 08:10:04 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Holger Kipp >Release: FreeBSD 4.5-STABLE i386 >Organization: >Environment: System: FreeBSD firewall.solit-ag.de 4.5-STABLE FreeBSD 4.5-STABLE #9: Thu Apr 25 15:39:00 CEST 2002 root@verleihnix.int1.b.intern:/usr/obj/usr/src/sys/VERLEIHNIX i386 >Description: twed is not supported by vinum. The first thing is that on stable we need to define every device with its major number in vinumio.c. The other is that commands.c checks for "vinum start" during boot if the device is of type DEVSTAT_TYPE_DIRECT, but does not allow DEVSTAT_TYPE_STORARRAY. As vinum could be used to mirror two Raid 5 arrays, or just for an easier disk management, DEVSTAT_TYPE_STORARRAY should also be allowed here. >How-To-Repeat: Try to install vinum on a twed-device, eg /dev/twed1a. >Fix: Apply the following changes: --- commands.c.orig Thu Apr 25 15:16:39 2002 +++ commands.c Thu Apr 25 15:15:48 2002 @@ -542,7 +542,8 @@ 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 */ + 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_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); and *** vinumio.c.orig Tue Apr 23 13:05:19 2002 --- vinumio.c Tue Apr 23 13:22:57 2002 *************** *** 93,98 **** --- 93,101 ---- } else if (bcmp(dname, "idad", 4) == 0) { devmajor = 109; dname += 2; + } else if (bcmp(dname, "twed", 4) == 0) { /* 3ware raid */ + devmajor = 147; + dname += 2; } else return ENODEV; dname += 2; /* point past */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message