From owner-freebsd-current Wed Jan 22 4:17:59 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69BC737B401; Wed, 22 Jan 2003 04:17:56 -0800 (PST) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EDC343EB2; Wed, 22 Jan 2003 04:17:54 -0800 (PST) (envelope-from ticso@cicely8.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.5/8.12.5) with ESMTP id h0MCHgUc027511 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 22 Jan 2003 13:17:46 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.1.10]) by cicely5.cicely.de (8.12.6/8.12.6) with ESMTP id h0MCHfCR062826 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 22 Jan 2003 13:17:41 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (localhost [127.0.0.1]) by cicely8.cicely.de (8.12.6/8.12.6) with ESMTP id h0MCHeMS010073; Wed, 22 Jan 2003 13:17:40 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: (from ticso@localhost) by cicely8.cicely.de (8.12.6/8.12.6/Submit) id h0MCHebE010072; Wed, 22 Jan 2003 13:17:40 +0100 (CET) Date: Wed, 22 Jan 2003 13:17:39 +0100 From: Bernd Walter To: phk@FreeBSD.ORG Cc: Joerg Wunsch , freebsd-current@FreeBSD.ORG Subject: Re: I want a sysctl kern.allow_shooting_into_my_foot! Message-ID: <20030122121739.GA758@cicely8.cicely.de> Reply-To: ticso@cicely.de References: <20030121225940.G37868@uriah.heep.sax.de> <18699.1043186765@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18699.1043186765@critter.freebsd.dk> X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Jan 21, 2003 at 11:06:05PM +0100, phk@FreeBSD.ORG wrote: > In message <20030121225940.G37868@uriah.heep.sax.de>, Joerg Wunsch writes: > >As phk@freebsd.org wrote: > > > >> Hang on. > >> > >> If no disk partitions of any kind are open, there is nothing which > >> prevents you from doing a "dd if=/dev/zero of=/dev/da0 bs=64k". > > > >My guess is that vinum scanned the disks when starting, but found > >nothing on it. > > And forgot to close them again ? Well, you know where to look > for that bug then :-) > > (If you look in the "sysctl -b kern.geom.confxml" output, you will > be able to see the read/write/exclusive open counts, look for > "r%dw%de%d" strings.) Interesting sysctl. [...] da13e 3 r1w1e0 da13c 3 r0w0e0 [...] da13 2 r0w0e0 [...] da13 2 16384 1024 0 0 r1w1e1 r1w1e0 da13e 652329984 1024 4 652329984 1274082 0 0 r0w0e0 da13c 652329984 1024 2 652329984 1274082 0 0 [...] If I got it right it tells me, that da13e is opened for read/write. da13 is an MO driver and I can't eject the media, because it's locked. The media was never mounted since booting. I never complained about this, because the system is rather old (2002-11-15) and I believed it was already fixed. But it sounds like Joergs situation may be triggered by the same bug. Mmmm - I'm using vinum too. Is there any way to find out which ones open it was? -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message