From owner-freebsd-hackers@FreeBSD.ORG Wed May 25 17:10:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED3B716A41C for ; Wed, 25 May 2005 17:10:09 +0000 (GMT) (envelope-from dga+@cs.cmu.edu) Received: from smtp.andrew.cmu.edu (smtp.andrew.cmu.edu [128.2.10.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B1C643D4C for ; Wed, 25 May 2005 17:10:09 +0000 (GMT) (envelope-from dga+@cs.cmu.edu) Received: from [192.168.15.50] (dsl093-060-134.pit1.dsl.speakeasy.net [66.93.60.134]) (user=dga2 mech=PLAIN (0 bits)) by smtp.andrew.cmu.edu (8.12.10/8.12.10) with ESMTP id j4PHA8LG018070 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 25 May 2005 13:10:09 -0400 Mime-Version: 1.0 (Apple Message framework v622) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-hackers@freebsd.org From: David Andersen Date: Wed, 25 May 2005 13:10:03 -0400 X-Mailer: Apple Mail (2.622) Subject: Opening raw disk while mounted in 5.x? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2005 17:10:10 -0000 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