From owner-freebsd-current@FreeBSD.ORG Sat Oct 31 06:49:32 2009 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 5E66D106568B; Sat, 31 Oct 2009 06:49:32 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id B2F5C8FC1C; Sat, 31 Oct 2009 06:49:31 +0000 (UTC) Received: by bwz5 with SMTP id 5so4405052bwz.3 for ; Fri, 30 Oct 2009 23:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=QjZMv07uJIMg5m1r3qo/nQavXE/jJu8ZPeBQQOs71eM=; b=HBF7pVily4i3Zt0/e7vD8qDNZaqQfxOLARzhM5oEjzLs790XFoA1d3qLrWvcyCSrw6 ZapZzCkb/S8fDYslEfwUmm/XudxFNCclrzcK0fe/Y5Yul2yHtuHgv/9rWlD6jhFFBffs iBS/IoEyrWBVDfHftGsefMbwkjqOIrn75YKhk= 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:content-type:content-transfer-encoding; b=vWbEPuFqpsGngtz8WmuK+htFv3zvEU6U9bVkdUrNPWNIMBOCc6PeegXqk9wPoLSSsd XJHXt3Dv5c2sGlYe2IuIxx/NNgY2wdxY9Lhhvs6nrEwdmBS9ZYvvpaClwWAIB6uDGUXU KPz8jK+VPttpbtjuFlAlFGem6hzEOUqlSzstY= Received: by 10.103.86.23 with SMTP id o23mr996569mul.116.1256971770790; Fri, 30 Oct 2009 23:49:30 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id y6sm3096746mug.10.2009.10.30.23.49.29 (version=SSLv3 cipher=RC4-MD5); Fri, 30 Oct 2009 23:49:30 -0700 (PDT) Sender: Alexander Motin Message-ID: <4AEBDDF8.8060609@FreeBSD.org> Date: Sat, 31 Oct 2009 08:49:28 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20090901) MIME-Version: 1.0 To: Kamigishi Rei References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD-Current , Scott Long Subject: Re: Weird CAM-ATA behaviour (8.0-RC1): disk cloning 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: Sat, 31 Oct 2009 06:49:32 -0000 Kamigishi Rei wrote: > I just noticed something weird in my device list (actually, I noticed it > in "glabel status" output, but then confirmed via camcontrol devlist): I > got a 7th HDD, ada6, which is, surprisingly, ada0. > > This is how it appeared (I've checked the logs): > > Oct 27 01:26:38 ameagari sudo: fujibayashi : TTY=pts/3 ; > PWD=/usr/home/fujibayashi ; USER=root ; COMMAND=/sbin/camcontrol rescan > 0:0:1 > Oct 27 01:26:38 ameagari kernel: (aprobe0:ahcich0:0:0:1): SIGNATURE: 0000 > Oct 27 01:26:38 ameagari kernel: ada6 at ahcich0 bus 0 target 0 lun 1 > Oct 27 01:26:38 ameagari kernel: ada6: ATA/ATAPI-8 > SATA 2.x device > Oct 27 01:26:38 ameagari kernel: ada6: 300.000MB/s transfers > Oct 27 01:26:38 ameagari kernel: ada6: 476940MB (976773168 512 byte > sectors: 16H 63S/T 16383C) > Oct 27 01:26:38 ameagari kernel: ada6: Native Command Queueing enabled > Oct 27 01:26:38 ameagari kernel: GEOM_MIRROR: Cannot add disk ada6 to > gm0 (error=17). > > While I know I made a mistake there (specifying 0:0:1 instead of 1:0:0), > is this behaviour really correct? I don't see why we should add a > 'cloned' disk device on a rescan of LUNs that do not really exist in the > first place. > > This is repeatable and I can create as many clones as I want (by doing > "camcontrol rescan X:Y:Z" where Y and Z can vary and X is the AHCI bus > number): Interesting effect. CAM ATA implementation doesn't use LUNs, in fact it ignores them. Also you may scan PMP port's target IDs when not PMP present with alike effect, as without PMP present nobody handles FIS port field. Probably we need some per-bus local storage (at SIM or may be XPT) to keep device's current status, reported by PMP driver. Thank you. -- Alexander Motin