From owner-freebsd-questions@FreeBSD.ORG Tue Mar 12 01:17:21 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 61E14201 for ; Tue, 12 Mar 2013 01:17:21 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 056CAE00 for ; Tue, 12 Mar 2013 01:17:20 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.6/8.14.6) with ESMTP id r2C1HKwa053347; Mon, 11 Mar 2013 19:17:20 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.6/8.14.6/Submit) with ESMTP id r2C1HJdR053344; Mon, 11 Mar 2013 19:17:20 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 11 Mar 2013 19:17:19 -0600 (MDT) From: Warren Block To: Carl Johnson Subject: Re: FreeBSD 9 and Windows XP In-Reply-To: <87620xtsfo.fsf@oak.localnet> Message-ID: References: <20130309120741.DED57767@ms5.mc.surewest.net> <20130311135110.9da99d99cfe968f2d904acd0@yahoo.es> <87a9q9udkd.fsf@oak.localnet> <87620xtsfo.fsf@oak.localnet> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Mon, 11 Mar 2013 19:17:20 -0600 (MDT) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2013 01:17:21 -0000 On Mon, 11 Mar 2013, Carl Johnson wrote: > Warren Block writes: > >> On Mon, 11 Mar 2013, Carl Johnson wrote: >> >>> It is my understanding that FreeBSD doesn't allow using part of a disk, >>> but grabs the entire disk. That means that VirtualBox can't use >>> partitions on a disk that any other partitions are being used by >>> anything else, including FreeBSD itself. Am I wrong about this? I use >>> VirtualBox using vdmk for an entire disk, but I have never been able to >>> share with anything else. >> >> It's very hard to tell what situation is being described here. If the >> VMDK is a pointer to a whole physical disk, that would probably make >> the disk only usable by one VM. It should be possible to make the >> VMDK point to just one partition on the disk. Then other VMs or a >> physical machine could use those other partitions while the FreeBSD VM >> was running. > > I was thinking of the case where I tried to allow direct access by a > virtual machine to a slice on the same disk that I was running FreeBSD > off of. I just looked further into that and discovered that it is > possible, but not allowed by geom by default. It can be done by setting > 'sysctl kern.geom.debugflags=0x10'. I am sure that you are aware of the > dangers, but for anybody else reading this check out the warning in the > geom(4) manpage. They refer to this option as 'allow foot shooting' for > a reason. That's kind of what I was saying. If you can get the VMDK to refer to just the one slice/partition that the VM needs, it won't lock the whole disk. For example, ada0s2a rather than ada0s2. Of course, it would be bad to share the same partition between more than one VM or physical machine at the same time unless it is mounted read-only by all of them.