From owner-freebsd-current@FreeBSD.ORG Fri May 6 08:34:01 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BBCF106564A for ; Fri, 6 May 2011 08:34:01 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id CBF738FC13 for ; Fri, 6 May 2011 08:34:00 +0000 (UTC) Received: by fxm11 with SMTP id 11so2878424fxm.13 for ; Fri, 06 May 2011 01:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=Z9W9wsEu/XvSqQ5Q+ouEUDFo8M1Ii8fCC5xpri7rwA0=; b=XrdGXQhyPa5P0qdGoKORKLS9xgtxZ7iEOWlXM0gCalo57Dr6yg0Txf/kFzo9lsWlsL 9lXOmmvHq0KOQeiiUPi3RB7AY2Y4D+XZtEXJDVkl9YOJO4Ve+uhOuEGZ+XfqF+iPmIf5 ZQylI92R60VaaG25Rb+Qq0cxQYWhOYa2jPnWs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=GbqF8KMseU8eFgpuHhsfcRRqGBB63q/eWC51crsTfd4qWVS2jmU7V7FhU4kPk+eFhh 5w6l3zwpY0vqQVXdpjy6WEPUnGgq/YoszbjeL4nrup9gPIt/v9GdYPEQVz2+V4MtYWMq M3zqIOUsMSdsRp2ZjkBm7Re9tXsmQ1rC1ebOs= Received: by 10.223.62.194 with SMTP id y2mr3091805fah.123.1304670839688; Fri, 06 May 2011 01:33:59 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id j18sm1002505faa.42.2011.05.06.01.33.57 (version=SSLv3 cipher=OTHER); Fri, 06 May 2011 01:33:58 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DC3B256.8050800@FreeBSD.org> Date: Fri, 06 May 2011 11:33:26 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Sergey Kandaurov References: <4DAEAE1B.70207@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD-Current Subject: Re: Switch from legacy ata(4) to CAM-based ATA X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 08:34:01 -0000 Sergey Kandaurov wrote: > XENHVM uses it's own naming scheme and can name disks as daN or adN, > depending on virtual block device id. atapci0/ata0/ata1 devices still present > there (such as in Bruce Cran's dmesg), but no any disks attached from it: > instead, all of them hung from device/vbd/N. > [In a non-XENHVM mode they are attached from ataN channels, as usual.] > > /* > * Translate Linux major/minor to an appropriate name and unit > * number. For HVM guests, this allows us to use the same drive names > * with blkfront as the emulated drives, easing transition slightly. > */ > > xenbusb_front0: on xenstore0 > xenbusb_back0: on xenstore0 > xctrl0: on xenstore0 > xbd0: 17000MB at device/vbd/768 on xenbusb_front0 > xbd0: attaching as ad0 > GEOM: ad0s1: geometry does not match label (16h,63s != 255h,63s). > xbd1: 3812MB at device/vbd/2048 on xenbusb_front0 > xbd1: attaching as da0 > xbd2: 114439MB at device/vbd/2064 on xenbusb_front0 > xbd2: attaching as da1 OK, interesting question. I have built amd64 XENHVM kernel and booted it under Xen 3.2. As result I've got double set of devices, via both atapci0/ata0 and via blkfront: ada0 at ata0 bus 0 scbus0 target 0 lun 0 ada0: ATA-7 device ada0: Serial Number QM00001 ada0: 16.700MB/s transfers (WDMA2, PIO 8192bytes) ada0: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad0 ada1 at ata0 bus 0 scbus0 target 1 lun 0 ada1: ATA-7 device ada1: Serial Number QM00002 ada1: 16.700MB/s transfers (WDMA2, PIO 8192bytes) ada1: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C) ada1: Previously was known as ad1 xbd0: 476940MB at device/vbd/768 on xenbusb_front0 xbd0: attaching as ad0 xbd1: 476940MB at device/vbd/832 on xenbusb_front0 xbd1: attaching as ad1 Both of them were exported to GEOM. Extra set of adX devices caused error messages. What am I doing wrong and why have I got those duplicates? Was I required to remove non-PV drivers from my kernel? > Probably, /sys/dev/xen/blkfront/blkfront.c needs updating by s/"ad"/"ada"/g; > or such. I believe, xen generates sequential numbers starting from zero > (or rather such numbers that can be converted to sequential numbers), > similar to what ATA_CAM does. According to what I see, blkfront follows ATA_STATIC_ID behavior: if I configure Xen with single slave device (hdb), blkfront reports it as ad1. -- Alexander Motin