From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KE9q7-00048z-Li for qemu-devel@nongnu.org; Wed, 02 Jul 2008 17:26:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KE9q5-000482-Sd for qemu-devel@nongnu.org; Wed, 02 Jul 2008 17:26:10 -0400 Received: from [199.232.76.173] (port=48921 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KE9q5-00047w-IE for qemu-devel@nongnu.org; Wed, 02 Jul 2008 17:26:09 -0400 Received: from relay01.mx.bawue.net ([193.7.176.67]:44351) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KE9q5-000522-3O for qemu-devel@nongnu.org; Wed, 02 Jul 2008 17:26:09 -0400 Date: Wed, 2 Jul 2008 22:26:07 +0100 From: Thiemo Seufer Subject: Re: [Qemu-devel] [patch 2/5] qemu-nbd: merge NBD client/server Message-ID: <20080702212607.GG7007@networkno.de> References: <20080627110204.818732368@bull.net> <20080627110247.660215428@bull.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080627110247.660215428@bull.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Laurent.Vivier@bull.net Laurent.Vivier@bull.net wrote: > This patch allows to connect directly a disk image file to an NBD > device. It introduces the use of a unix socket (instead of inet). > > - To connect a file to a device: > > # qemu-nbd --connect=/dev/nbd0 my_disk.qcow2 > > Then you can see directly your disk (no need of nbd-client): > > # fdisk -l /dev/nbd0 > > Disk /dev/nbd0: 4294 MB, 4294967296 bytes > 255 heads, 63 sectors/track, 522 cylinders > Units = cylinders of 16065 * 512 = 8225280 bytes > > Device Boot Start End Blocks Id System > /dev/nbd0p1 * 1 492 3951958+ 83 Linux > /dev/nbd0p2 493 522 240975 5 Extended > /dev/nbd0p5 493 522 240943+ 82 Linux swap / > Solaris > > - To disconnect the file from the device: > > # qemu-nbd --disconnect /dev/nbd0 > > Changelog: > - v2: call show_parts() from client and avoid the sleep(1). Thank you to > Avi and Anthony. Include my cleanup patch and comments from Carlo > Marcelo Arenas Belon. > - v3: allow to specify unix socket name with "--socket" and update > documentation. There's still a call to sleep() in this patch. Thiemo