Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2003 13:17:39 +0100
From:      Bernd Walter <ticso@cicely8.cicely.de>
To:        phk@FreeBSD.ORG
Cc:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>, freebsd-current@FreeBSD.ORG
Subject:   Re: I want a sysctl kern.allow_shooting_into_my_foot!
Message-ID:  <20030122121739.GA758@cicely8.cicely.de>
In-Reply-To: <18699.1043186765@critter.freebsd.dk>
References:  <20030121225940.G37868@uriah.heep.sax.de> <18699.1043186765@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
[...]
    <geom id="0xc2c55400">
      <class ref="0xc0314160"/>
      <name>da13e</name>
      <rank>3</rank>
        <consumer id="0xc2b53b80">
          <geom ref="0xc2c55400"/>
          <provider ref="0xc2c4c800"/>
          <mode>r1w1e0</mode>
        </consumer>
    </geom>
    <geom id="0xc2c55600">
      <class ref="0xc0314160"/>
      <name>da13c</name>
      <rank>3</rank>
        <consumer id="0xc2c3b6c0">
          <geom ref="0xc2c55600"/>
          <provider ref="0xc2c4d680"/>
          <mode>r0w0e0</mode>
        </consumer>
    </geom>
[...]
    <geom id="0xc2c4c480">
      <class ref="0xc0314160"/>
      <name>da13</name>
      <rank>2</rank>
        <consumer id="0xc2c4f880">
          <geom ref="0xc2c4c480"/>
          <provider ref="0xc2c35380"/>
          <mode>r0w0e0</mode>
        </consumer>
    </geom>
[...]
    <geom id="0xc2c4d300">
      <class ref="0xc03337a0"/>
      <name>da13</name>
      <rank>2</rank>
      <config>
        <frontstuff>16384</frontstuff>
        <labeloffset>1024</labeloffset>
        <rawoffset>0</rawoffset>
        <mbroffset>0</mbroffset>
      </config>
        <consumer id="0xc2c4f780">
          <geom ref="0xc2c4d300"/>
          <provider ref="0xc2c35380"/>
          <mode>r1w1e1</mode>
          <config>
          </config>
        </consumer>
        <provider id="0xc2c4c800">
          <geom ref="0xc2c4d300"/>
          <mode>r1w1e0</mode>
          <name>da13e</name>
          <mediasize>652329984</mediasize>
          <sectorsize>1024</sectorsize>
          <config>
            <index>4</index>
            <length>652329984</length>
            <seclength>1274082</seclength>
            <offset>0</offset>
            <secoffset>0</secoffset>
          </config>
        </provider>
        <provider id="0xc2c4d680">
          <geom ref="0xc2c4d300"/>
          <mode>r0w0e0</mode>
          <name>da13c</name>
          <mediasize>652329984</mediasize>
          <sectorsize>1024</sectorsize>
          <config>
            <index>2</index>
            <length>652329984</length>
            <seclength>1274082</seclength>
            <offset>0</offset>
            <secoffset>0</secoffset>
          </config>
        </provider>
    </geom>
[...]

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030122121739.GA758>