From owner-freebsd-stable@FreeBSD.ORG Mon Mar 25 18:55:42 2013 Return-Path: Delivered-To: stable@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 A58F06BE for ; Mon, 25 Mar 2013 18:55:42 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from lennier.cc.vt.edu (lennier.cc.vt.edu [198.82.162.213]) by mx1.freebsd.org (Postfix) with ESMTP id 5BF03A38 for ; Mon, 25 Mar 2013 18:55:42 +0000 (UTC) Received: from steiner.cc.vt.edu (steiner.cc.vt.edu [198.82.163.51]) by lennier.cc.vt.edu (8.13.8/8.13.8) with ESMTP id r2PIgHel020822; Mon, 25 Mar 2013 14:55:04 -0400 Received: from auth3.smtp.vt.edu (EHLO auth3.smtp.vt.edu) ([198.82.161.152]) by steiner.cc.vt.edu (MOS 4.3.3-GA FastPath queued) with ESMTP id WCJ05853; Mon, 25 Mar 2013 14:55:03 -0400 (EDT) Received: from pmather.tower.lib.vt.edu (pmather.tower.lib.vt.edu [128.173.51.28]) (authenticated bits=0) by auth3.smtp.vt.edu (8.13.8/8.13.8) with ESMTP id r2PIt2XU024603 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 25 Mar 2013 14:55:03 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: Virtio and GEOM labels From: Paul Mather In-Reply-To: <44809413-C1A4-4A0E-8598-B88651A16A8F@jnielsen.net> Date: Mon, 25 Mar 2013 14:55:02 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <44809413-C1A4-4A0E-8598-B88651A16A8F@jnielsen.net> To: John Nielsen X-Mailer: Apple Mail (2.1503) X-Mirapoint-Received-SPF: 198.82.161.152 auth3.smtp.vt.edu paul@gromit.dlib.vt.edu 5 none X-Junkmail-Status: score=10/50, host=steiner.cc.vt.edu X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A020204.51509D88.01BB,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2011-07-25 19:15:43, dmn=2011-05-27 18:58:46, mode=single engine X-Junkmail-IWF: false Cc: "stable@FreeBSD.org" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2013 18:55:42 -0000 On Mar 25, 2013, at 1:46 PM, John Nielsen wrote: > On Mar 22, 2013, at 8:14 AM, Paul Mather = wrote: >=20 >> I'm running FreeBSD 9-STABLE as a guest under RHEL 6.4 KVM = virtualisation. I have networking and storage in the FreeBSD guest = using the Virtio drivers (with the virtual disk set to "Virtio" in the = definition on the host). Everything is working nicely: I have a vtnet = network adapter and see vtbd devices for my virtual disks in FreeBSD. = Performance is much better compared with an emulated IDE device. >=20 > I've had the same experience. >=20 >> The odd thing is that I don't see GEOM labels reflected in /dev. For = example, I have GPT labels defined in the guest, but I don't see them = show up under /dev/gpt. Similarly, my UFS labels don't show up under = /dev/ufs. I *do* see a /dev/gptid. That appears to be the only label = that shows up. >=20 > I have not encountered this issue. I use virtio block devices and GPT = labels exclusively in multiple FreeBSD 9.1 guests and all mount/function = without issue. How are you referring to your filesystems in /etc/fstab? = IIRC GEOM makes not-in-use labels disappear when a device is in use = (e.g. mounted). If you take a new device, put a labeled GPT partition on = it and a labeled UFS partition on that but don't mount anything, what = happens? Thanks for the reply. My apologies: this is a case of pilot error on my part. I was mounting = the devices as /dev/vtbd... I hadn't realised that the = present-but-unused labels were being suppressed when the device was = mounted. Has this always been the case? For some reason I had a = distinct recollection stuck in my mind that all labels showed up in = /dev. Anyway, many thanks for pointing the way to the solution. I now have = GPT- and UFS-labelled devices mounted in my FreeBSD guest system. >=20 >> Is there something special I need to do to get GPT and UFS labels to = appear when using Virtio? It seems to me that Virtio block devices = appear to be somewhat unusual. Unlike regular ATA and SCSI devices, my = vtbd devices don't appear in the boot dmesg (although a vtblk device = does), and "camcontrol devlist" does not list them. It's not clear to = me how I am supposed to interact with them other than via basic device = I/O through /dev/vtbdX. I thought that the virtio_scsi module might = make them appear as "da" devices and able to interacted with via = camcontrol, but this doesn't seem to be the case. >=20 > Virtio block devices and virtio SCSI devices are not the same. If you = want to use the virtio_scsi module in FreeBSD you should expose a virtio = SCSI device from the host. Thank you for the explanation. I've been using virt-manager up to now = for setting up KVM guests and it seems that virtio-scsi isn't exposed = through that interface---only through the command line. I'll have to = investigate... Cheers, Paul.