From owner-freebsd-stable Wed Mar 6 8:23:14 2002 Delivered-To: freebsd-stable@freebsd.org Received: from nat72962.owentools.com (nat72962.owentools.com [206.50.138.221]) by hub.freebsd.org (Postfix) with ESMTP id 8D96237B405; Wed, 6 Mar 2002 08:22:44 -0800 (PST) Received: from meoqu.gank.org (localhost [127.0.0.1]) by nat72962.owentools.com (Postfix) with ESMTP id C17F0CFF2; Wed, 6 Mar 2002 10:22:43 -0600 (CST) Message-ID: <3C864253.5000700@meoqu.gank.org> Date: Wed, 06 Mar 2002 10:22:43 -0600 From: Craig Boston User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.8) Gecko/20020226 X-Accept-Language: en-us MIME-Version: 1.0 To: sos@freebsd.dk Cc: stable@freebsd.org, grog@freebsd.org Subject: Re: Request for testers of new ATA driver patches References: <200203060821.g268LR045942@freebsd.dk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG S?ren Schmidt wrote: > >Hmm, the ATA driver doesn't allow access to the individual disks in >a RAID for security reasons, but if you need it you just need to >rip out the test for raid disk and return EBUSY in ata-disk.c:adopen(). >Why binum wont play ball I have no idea, ask groggy... > I figued it was something like that. I really didn't like the idea of accessing ad* directly on a RAID controller anyway, and was pretty surprised that it actually worked. I just didn't want to take the time to hack up vinum (since I would have to remember to reapply the patch after every cvsup :) ). But if I'm going to be applying your ATA patch anyway... Hmm, it looks to be a pretty simple fix. vinumio.c has a hardcoded list of devices and their majors, apparently so vinum can be initialized before root is mounted. Funny, I thought you couldn't have a vinum root partition... WIP? Anyway, the following patch should do the trick. --- vinumio.c.orig Wed Mar 6 08:33:05 2002 +++ vinumio.c Wed Mar 6 08:44:24 2002 @@ -78,6 +78,8 @@ devmajor = 116; else if (bcmp(dname, "wd", 2) == 0) /* IDE disk */ devmajor = 3; + else if (bcmp(dname, "ar", 2) == 0) /* ATA RAID */ + devmajor = 157; else if (bcmp(dname, "da", 2) == 0) devmajor = 13; else if (bcmp(dname, "vn", 2) == 0) Rebuilt the world and kernel fine, and vinum seems to like ar0 as a disk now, but if course the configuration is invalid since it's pointing at ad4. I *THINK* I know how to safely migrate my volumes to the new device names, but am doing a full backup right now just in case :) Greg: in case you don't read stable, to answer the question of why in the world anyone would want to run vinum on an ATA RAID device, suffice it to say it's a long story. But I'm copying you just in case anyone else needs to do this as it's a very simple fix. Oh, BTW, gotta love the comment right above that section in the same file: /* * Yes, Bruce, I know this is horrible, but we * don't have a root file system when we first * try to do this. If you can come up with a * better solution, I'd really like it. I'm * just putting it in now to add ammuntion to * moving the system to devfs. */ Thanks, Craig To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message