From owner-freebsd-current Sat Feb 3 17: 5: 5 2001 Delivered-To: freebsd-current@freebsd.org Received: from moby.geekhouse.net (moby.geekhouse.net [64.81.6.36]) by hub.freebsd.org (Postfix) with ESMTP id A6CA337B503; Sat, 3 Feb 2001 17:04:46 -0800 (PST) Received: from laptop.baldwin.cx (john@dhcp151.geekhouse.net [192.168.1.151]) by moby.geekhouse.net (8.11.0/8.9.3) with ESMTP id f1415Mc20602; Sat, 3 Feb 2001 17:05:23 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010204095241U.matusita@ics.es.osaka-u.ac.jp> Date: Sat, 03 Feb 2001 17:04:29 -0800 (PST) From: John Baldwin To: Makoto MATSUSHITA Subject: RE: doFS.sh should obey MDDEVICE if available Cc: current@FreeBSD.org, phk@FreeBSD.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 04-Feb-01 Makoto MATSUSHITA wrote: > > jhb> The current method always finds an unused device to use, so the > jhb> old VNDEVICE-style hack is no longer needed. There's no point to > jhb> setting an explicit device to use. > > But I want to ensure that all used md(4) devices is unconfigured after > it is used. > > Imagine you run 'make release' for your own release. If something is > trouble in doFS.sh ('kernel size exceeds 1.44MB floppy size' is a > typical example), make will exit without umounting /mnt and > unconfigureing /dev/mdX, where X is dynamically allocated (and no way > to know what X is outside of doFS.sh). If I can say 'doFS.sh, your md > device number is X', it's obviously easy to umount /mnt and > unconfigure md devices after the script runs. If it is still mounted, you can see the device by just typing 'mount' to get a list of mounted filesystems. You will have something like: /dev/md0 on /mnt (ufs, local) Also, I think that this isn't the right fix to a bigger problem. Instead, it shouldn't be hard to get a list of configured devices out of mdconfig via an ioctl on /dev/mdctl. This would be the right fix, as it would fix the general case problem you describe, not just one instance of it. mdconfig wont' be able to tell you what file it is attached to by filename, but it should be able to ask /dev/mdctl for a list of devices and report at least the type of each device (swap, file, etc.). -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message