Re: Opening raw disk while mounted in 5.x?

From: David Andersen (dga+_at_cs.cmu.edu)
Date: 05/25/05

  • Next message: Aziz Kezzou: "weird NFS problem ?"
    Date: Wed, 25 May 2005 13:55:41 -0400
    To: David Andersen <dga+@cs.cmu.edu>
    
    

    To answer my own question - this appears to be done in the geom
    subsystem now. It can be avoided by enabling the magic foot-shooting
    debug flag:

       sysctl -w kern.geom.debugflags=16

    if you're inclined to shoot yourself in the foot.

       -Dave

    On May 25, 2005, at 1:10 PM, David Andersen wrote:

    > Hoping someone knows the quick answer to this - in 4.x, it was
    > possible to open /dev/ad0 while a filesystem one one of its slices was
    > mounted. This no longer appears possible under 5.x. Could someone
    > point me to the spot in the code where I'd need to disable a
    > permissions check (or a sysctl, or anything) to permit this behavior
    > again?
    >
    > (The context: mounting slice 2 of a disk and using it to store a
    > compressed filesystem image. Then opening the primary disk device to
    > directly write the filesystem image onto slice 1. The kernel seems to
    > muck with the write calls if we try to do the write onto slice 1
    > instead of the raw disk). This is using the very cool
    > imagezip/imageunzip utilities from the Utah Emulab project.
    >
    > Thanks!
    >
    > -Dave
    >

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Aziz Kezzou: "weird NFS problem ?"

    Relevant Pages

    • Re: Opening raw disk while mounted in 5.x?
      ... Then opening the primary disk device to ... > directly write the filesystem image onto slice 1. ... Try setting the kern.geom.debugflags sysctl to 16. ...
      (freebsd-hackers)
    • Opening raw disk while mounted in 5.x?
      ... to open /dev/ad0 while a filesystem one one of its slices was mounted. ... Then opening the primary disk device to ... directly write the filesystem image onto slice 1. ...
      (freebsd-hackers)