From owner-freebsd-hackers@FreeBSD.ORG Wed May 25 17:54:28 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 7416B16A41C for ; Wed, 25 May 2005 17:54:28 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E97E43D1D for ; Wed, 25 May 2005 17:54:27 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j4PHsJdF093931; Wed, 25 May 2005 12:54:19 -0500 (CDT) (envelope-from dan) Date: Wed, 25 May 2005 12:54:19 -0500 From: Dan Nelson To: David Andersen Message-ID: <20050525175419.GA87847@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: 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:54:28 -0000 In the last episode (May 25), David Andersen said: > 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. Try setting the kern.geom.debugflags sysctl to 16. The kerenl shouldn't have stopped you from writing to slice 1 though. -- Dan Nelson dnelson@allantgroup.com