Date: Tue, 20 Oct 1998 04:43:02 -0700 (PDT) From: asami@cs.berkeley.edu (Satoshi Asami) To: scsi@FreeBSD.ORG Subject: for i in disks Message-ID: <199810201143.EAA17327@silvia.hip.berkeley.edu>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810201143.EAA17327>