From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSfg9-0008M6-LG for qemu-devel@nongnu.org; Thu, 29 Jan 2009 17:48:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSfg8-0008LN-4w for qemu-devel@nongnu.org; Thu, 29 Jan 2009 17:48:08 -0500 Received: from [199.232.76.173] (port=40028 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSfg7-0008LK-Vy for qemu-devel@nongnu.org; Thu, 29 Jan 2009 17:48:08 -0500 Received: from e3.ny.us.ibm.com ([32.97.182.143]:43276) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LSfg7-00073i-M8 for qemu-devel@nongnu.org; Thu, 29 Jan 2009 17:48:07 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e3.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n0TMkAf5025316 for ; Thu, 29 Jan 2009 17:46:10 -0500 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n0TMm1U4196344 for ; Thu, 29 Jan 2009 17:48:01 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n0TMl3Ph025072 for ; Thu, 29 Jan 2009 17:47:03 -0500 Date: Thu, 29 Jan 2009 16:47:56 -0600 From: Ryan Harper Subject: Re: [Qemu-devel] virtio_blk unique device ID Message-ID: <20090129224756.GI13481@us.ibm.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jule Slootbeek Cc: qemu-devel@nongnu.org * Jule Slootbeek [2009-01-29 16:13]: > All, > I was recently testing the workings of virtio to provision SAN block devices > to a domain, which worked great! However, i could not find a way to find the > UID of a virto_blk device. The scenario I had created was the following. a > LUN provisioned to my KVM (kvm-83) hypervisor over two paths, both paths > mapped to my domain using virtio_blk. When configuring multipath-tools in > the domain I could not find a way to find the UID of the LUN in order to > create the multipath config. On a SCSI device, I would use the > /lib/udev/scsi_id tools to discover this ID. I am using libvir/qemu 0.5.1 in > Ubuntu Jaunty Alpha-3 as hypervisor and virtual machine. > Does the virtio_blk driver provide a UID to its devices, and is there a way > to get this ID in userspace? use uuid? Some distros (Ubuntu for example) mount via UUID % blkid /dev/vda1: UUID="6331275f-f10d-4684-8aa8-e8aca1582b9d" TYPE="swap" /dev/vda2: UUID="cf121062-fd27-4151-8a68-6cb940e449fe" TYPE="ext3" # ls -al /dev/disk/by-uuid/ total 0 lrwxrwxrwx 1 root root 10 Jan 29 17:10 6331275f-f10d-4684-8aa8-e8aca1582b9d -> ../../vda1 lrwxrwxrwx 1 root root 10 Jan 29 17:10 cf121062-fd27-4151-8a68-6cb940e449fe -> ../../vda2 -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com