From owner-freebsd-scsi Tue Oct 20 04:43:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA07087 for freebsd-scsi-outgoing; Tue, 20 Oct 1998 04:43:44 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from vader.cs.berkeley.edu (vader.CS.Berkeley.EDU [128.32.38.234]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA07081 for ; Tue, 20 Oct 1998 04:43:42 -0700 (PDT) (envelope-from asami@vader.cs.berkeley.edu) Received: from silvia.hip.berkeley.edu (sji-ca9-115.ix.netcom.com [209.109.236.115]) by vader.cs.berkeley.edu (8.8.7/8.7.3) with ESMTP id EAA16057 for ; Tue, 20 Oct 1998 04:43:05 -0700 (PDT) Received: (from asami@localhost) by silvia.hip.berkeley.edu (8.8.8/8.6.9) id EAA17327; Tue, 20 Oct 1998 04:43:02 -0700 (PDT) Date: Tue, 20 Oct 1998 04:43:02 -0700 (PDT) Message-Id: <199810201143.EAA17327@silvia.hip.berkeley.edu> To: scsi@FreeBSD.ORG Subject: for i in disks From: asami@cs.berkeley.edu (Satoshi Asami) Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi folks, I'm thinking about implementing an "autorun"-like mechanism for disks. The idea is to have a script with a known name on a known position (say, partition `a' on the first BSD slice) which is called during boot. The script does something to set up the disk (mount some other partition, or set up a ccd, or something like that). However, to do this, I need to be able to write a loop in /etc/rc* to iterate through all available disks. I guess devfs when fully implemented will make this easy ("/devfs/da[0-9]*s?a"?) but my understanding is that it is not ready yet. I could try mounting all the nodes in /dev (the ones that are not available will presumably just fail) but with up to 96 disks per system, that could be a lot of failures. I could do something like grep 'da[^ ]* at ahc' /var/run/dmesg.boot but it sometimes overlaps other messages and it also appears to be very incomplete on some machines. === >> grep 'da[^ ]* at ahc' /var/run/dmesg.boot | sort WARNING: / was not properly dida12 at ahc0 bus 0 target 12 lun 0 da0 at ahc0 bus 0 target 0 lun 0 da1 at ahc0 bus 0 target 1 lun 0 da10 at ahc0 bus 0 target 10 lun 0 da11 at ahc0 bus 0 target 11 lun 0 da13 at ahc0 bus 0 target 13 lun 0 da14 at ahc0 bus 0 target 14 lun 0 da15 at ahc0 bus 0 target 15 lun 0 da2 at ahc0 bus 0 target 2 lun 0 da3 at ahc0 bus 0 target 3 lun 0 da4 at ahc0 bus 0 target 4 lun 0 da5 at ahc0 bus 0 target 5 lun 0 da64 at ahc4 bus 0 target 0 lun 0 da75 at ahc4 bus 0 target 11 lun 0 da8 at ahc0 bus 0 target 8 lun 0 da9 at ahc0 bus 0 target 9 lun 0 === (There are 42 disks on this machine.) Any ideas? Satoshi (I know I know, one of these days I'll actually implement something) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message